Fix Gradio version issue #18
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix Gradio version issue for gradio_app.py
Before fix:
(tts) root@35zdt2v8kxmt8e:
/GLM-TTS# python -c "import gradio as gr; print(gr.version)"/GLM-TTS# PYTHONPATH=. python tools/gradio_app.py6.0.2
(tts) root@35zdt2v8kxmt8e:
/root/miniconda3/envs/tts/lib/python3.10/site-packages/jieba/_compat.py:18: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
Warning: failed to import ttsfrd, use WeTextProcessing instead
Traceback (most recent call last):
File "/root/GLM-TTS/tools/gradio_app.py", line 159, in
with gr.Blocks(title="GLMTTS Inference", theme=gr.themes.Soft()) as app:
File "/root/miniconda3/envs/tts/lib/python3.10/site-packages/gradio/blocks.py", line 1071, in init
super().init(render=False, **kwargs)
TypeError: BlockContext.init() got an unexpected keyword argument 'theme'
After fix:
Successfully installed gradio-6.1.0
WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning.
(tts) root@35zdt2v8kxmt8e:~/GLM-TTS# PYTHONPATH=. python tools/gradio_app.py
/root/miniconda3/envs/tts/lib/python3.10/site-packages/jieba/_compat.py:18: UserWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html. The pkg_resources package is slated for removal as early as 2025-11-30. Refrain from using this package or pin to Setuptools<81.
import pkg_resources
Warning: failed to import ttsfrd, use WeTextProcessing instead
/root/GLM-TTS/tools/gradio_app.py:159: UserWarning: The parameters have been moved from the Blocks constructor to the launch() method in Gradio 6.0: theme. Please pass these parameters to launch() instead.
with gr.Blocks(title="GLMTTS Inference", theme="soft") as app:
share=Trueinlaunch().