-
Notifications
You must be signed in to change notification settings - Fork 291
Description
gradio一直在加载。之前安装的 gradio==5.9.1连后端都启动不了,现在的gradio版本是5.49.1.
(flashrag311) D:\RAG\FlashRAG-main>pip show gradio
Name: gradio
Version: 5.49.1
(flashrag311) D:\RAG\FlashRAG-main>D:/Anaconda/envs/flashrag311/python.exe d:/RAG/FlashRAG-main/webui/interface.py
d:\RAG\FlashRAG-main\webui\components\chat.py:9: UserWarning: You have not specified a value for the type parameter. Defaulting to the 'tuples' format for chatbot messages, but this is deprecated and will be removed in a future version of Gradio. Please set type='messages' instead, which uses openai-style dictionaries with 'role' and 'content' keys.
chatbot = gr.Chatbot(show_copy_button = True)
- Running on local URL: http://127.0.0.1:7860
- Running on public URL: https://3a95c8614b08608500.gradio.live
This share link expires in 1 week. For free permanent hosting and GPU upgrades, run gradio deploy from the terminal in the working directory to deploy to Hugging Face Spaces (https://huggingface.co/spaces)
=====================
官方推荐的5.9.1版的gradio存在的错误是。查了网上发现把Downgrade pydantic到2.10.6即可
ERROR: Exception in ASGI application
Traceback (most recent call last):
File "D:\Anaconda\envs\flashrag311\Lib\site-packages\uvicorn\protocols\http\h11_impl.py", line 403, in run_asgi
result = await app( # type: ignore[func-returns-value]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Anaconda\envs\flashrag311\Lib\site-packages\uvicorn\middleware\proxy_headers.py", line 60, in call
return await self.app(scope, receive, send)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Anaconda\envs\flashrag311\Lib\site-packages\fastapi\applications.py", line 1134, in call
await super().call(scope, receive, send)
File "D:\Anaconda\envs\flashrag311\Lib\site-packages\starlette\applications.py", line 113, in call
await self.middleware_stack(scope, receive, send)
.......
File "D:\Anaconda\envs\flashrag311\Lib\site-packages\gradio_client\utils.py", line 887, in get_type
if "const" in schema:
^^^^^^^^^^^^^^^^^
TypeError: argument of type 'bool' is not iterable
Keyboard interruption in main thread... closing server.
========
(flashrag311) D:\RAG\FlashRAG-main>pip show pydantic
Name: pydantic
Version: 2.11.10
(flashrag311) D:\RAG\FlashRAG-main>pip install pydantic==2.10.6
Looking in indexes: https://pypi.tuna.tsinghua.edu.cn/simple
........
Attempting uninstall: pydantic
Found existing installation: pydantic 2.11.10
Uninstalling pydantic-2.11.10:
Successfully uninstalled pydantic-2.11.10
ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
pyserini 1.3.0 requires fastmcp>=2.10.4, which is not installed.
mcp 1.21.0 requires pydantic<3.0.0,>=2.11.0, but you have pydantic 2.10.6 which is incompatible.