Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradio 5 is out, and there are many improvements. #3669

Open
surak opened this issue Jan 24, 2025 · 0 comments
Open

Gradio 5 is out, and there are many improvements. #3669

surak opened this issue Jan 24, 2025 · 0 comments

Comments

@surak
Copy link
Collaborator

surak commented Jan 24, 2025

Gradio 5 has come out. It has two things which are interesting:

  • It's much faster,
  • It has a resizable chatbot field.

However, a lot of things changed in it. And while gradio_web_server.py works just fine with it, it produces an inordinate amount of warnings and errors on the logs, due to some breaking changes.

For example:

2025-01-24 19:24:48 | ERROR | stderr |   File "/Users/surak/Devel/FastChat/sc_venv_template/venv/lib/python3.11/site-packages/gradio/queueing.py", line 625, in process_events
2025-01-24 19:24:48 | ERROR | stderr |     response = await route_utils.call_process_api(
2025-01-24 19:24:48 | ERROR | stderr |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-24 19:24:48 | ERROR | stderr |   File "/Users/surak/Devel/FastChat/sc_venv_template/venv/lib/python3.11/site-packages/gradio/route_utils.py", line 322, in call_process_api
2025-01-24 19:24:48 | ERROR | stderr |     output = await app.get_blocks().process_api(
2025-01-24 19:24:48 | ERROR | stderr |              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-24 19:24:48 | ERROR | stderr |   File "/Users/surak/Devel/FastChat/sc_venv_template/venv/lib/python3.11/site-packages/gradio/blocks.py", line 2042, in process_api
2025-01-24 19:24:48 | ERROR | stderr |     result = await self.call_function(
2025-01-24 19:24:48 | ERROR | stderr |              ^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-24 19:24:48 | ERROR | stderr |   File "/Users/surak/Devel/FastChat/sc_venv_template/venv/lib/python3.11/site-packages/gradio/blocks.py", line 1589, in call_function
2025-01-24 19:24:48 | ERROR | stderr |     prediction = await anyio.to_thread.run_sync(  # type: ignore
2025-01-24 19:24:48 | ERROR | stderr |                  ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-24 19:24:48 | ERROR | stderr |   File "/Users/surak/Devel/FastChat/sc_venv_template/venv/lib/python3.11/site-packages/anyio/to_thread.py", line 56, in run_sync
2025-01-24 19:24:48 | ERROR | stderr |     return await get_async_backend().run_sync_in_worker_thread(
2025-01-24 19:24:48 | ERROR | stderr |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-24 19:24:48 | ERROR | stderr |   File "/Users/surak/Devel/FastChat/sc_venv_template/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread
2025-01-24 19:24:48 | ERROR | stderr |     return await future
2025-01-24 19:24:48 | ERROR | stderr |            ^^^^^^^^^^^^
2025-01-24 19:24:48 | ERROR | stderr |   File "/Users/surak/Devel/FastChat/sc_venv_template/venv/lib/python3.11/site-packages/anyio/_backends/_asyncio.py", line 859, in run
2025-01-24 19:24:48 | ERROR | stderr |     result = context.run(func, *args)
2025-01-24 19:24:48 | ERROR | stderr |              ^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-24 19:24:48 | ERROR | stderr |   File "/Users/surak/Devel/FastChat/sc_venv_template/venv/lib/python3.11/site-packages/gradio/utils.py", line 883, in wrapper
2025-01-24 19:24:48 | ERROR | stderr |     response = f(*args, **kwargs)
2025-01-24 19:24:48 | ERROR | stderr |                ^^^^^^^^^^^^^^^^^^
2025-01-24 19:24:48 | ERROR | stderr |   File "/Users/surak/Devel/FastChat/fastchat/serve/gradio_web_server.py", line 285, in load_demo
2025-01-24 19:24:48 | ERROR | stderr |     return load_demo_single(models, url_params)
2025-01-24 19:24:48 | ERROR | stderr |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2025-01-24 19:24:48 | ERROR | stderr |   File "/Users/surak/Devel/FastChat/fastchat/serve/gradio_web_server.py", line 257, in load_demo_single
2025-01-24 19:24:48 | ERROR | stderr |     models = context.text_models
2025-01-24 19:24:48 | ERROR | stderr |              ^^^^^^^^^^^^^^^^^^^
2025-01-24 19:24:48 | ERROR | stderr | AttributeError: 'list' object has no attribute 'text_models'

And

2025-01-24 19:24:59 | ERROR | stderr | /Users/surak/Devel/FastChat/sc_venv_template/venv/lib/python3.11/site-packages/gradio/blocks.py:1775: UserWarning: A function (add_text) returned too many output values (needed: 8, returned: 9). Ignoring extra values.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant