logan-zou / Chat_with_Datawhale_langchain

73 stars 6 forks source link

gradio运行失败 #6

Open JiXia830 opened 1 week ago

JiXia830 commented 1 week ago

运行gradio /Chat_with_Datawhale_langchain/serve# python run_gradio.py -model_name='chatglm_std' -embedding_model='m3e' -db_path='../../data_base/knowledge_db' -persist_path='../../data_base/vector_db' 提示信息: /root/miniconda3/lib/python3.10/site-packages/langchain/_api/module_import.py:92: LangChainDeprecationWarning: Importing HuggingFaceEmbeddings from langchain.embeddings is deprecated. Please replace deprecated imports:

from langchain.embeddings import HuggingFaceEmbeddings

with new imports of:

from langchain_community.embeddings import HuggingFaceEmbeddings You can use the langchain cli to automatically upgrade many imports. Please see documentation here https://python.langchain.com/v0.2/docs/versions/v0_2/ warn_deprecated( /root/miniconda3/lib/python3.10/site-packages/langchain/_api/module_import.py:92: LangChainDeprecationWarning: Importing OpenAIEmbeddings from langchain.embeddings is deprecated. Please replace deprecated imports:

from langchain.embeddings import OpenAIEmbeddings

with new imports of:

from langchain_community.embeddings import OpenAIEmbeddings You can use the langchain cli to automatically upgrade many imports. Please see documentation here https://python.langchain.com/v0.2/docs/versions/v0_2/ warn_deprecated( /root/miniconda3/lib/python3.10/site-packages/langchain/_api/module_import.py:92: LangChainDeprecationWarning: Importing UnstructuredFileLoader from langchain.document_loaders is deprecated. Please replace deprecated imports:

from langchain.document_loaders import UnstructuredFileLoader

with new imports of:

from langchain_community.document_loaders import UnstructuredFileLoader You can use the langchain cli to automatically upgrade many imports. Please see documentation here https://python.langchain.com/v0.2/docs/versions/v0_2/ warn_deprecated( /root/miniconda3/lib/python3.10/site-packages/langchain/_api/module_import.py:92: LangChainDeprecationWarning: Importing UnstructuredMarkdownLoader from langchain.document_loaders is deprecated. Please replace deprecated imports:

from langchain.document_loaders import UnstructuredMarkdownLoader

with new imports of:

from langchain_community.document_loaders import UnstructuredMarkdownLoader You can use the langchain cli to automatically upgrade many imports. Please see documentation here https://python.langchain.com/v0.2/docs/versions/v0_2/ warn_deprecated( /root/miniconda3/lib/python3.10/site-packages/langchain/_api/module_import.py:92: LangChainDeprecationWarning: Importing PyMuPDFLoader from langchain.document_loaders is deprecated. Please replace deprecated imports:

from langchain.document_loaders import PyMuPDFLoader

with new imports of:

from langchain_community.document_loaders import PyMuPDFLoader You can use the langchain cli to automatically upgrade many imports. Please see documentation here https://python.langchain.com/v0.2/docs/versions/v0_2/ warn_deprecated( /root/miniconda3/lib/python3.10/site-packages/langchain/_api/module_import.py:92: LangChainDeprecationWarning: Importing Chroma from langchain.vectorstores is deprecated. Please replace deprecated imports:

from langchain.vectorstores import Chroma

with new imports of:

from langchain_community.vectorstores import Chroma You can use the langchain cli to automatically upgrade many imports. Please see documentation here https://python.langchain.com/v0.2/docs/versions/v0_2/ warn_deprecated( /root/miniconda3/lib/python3.10/site-packages/langchain/chat_models/init.py:32: LangChainDeprecationWarning: Importing chat models from langchain is deprecated. Importing from langchain will no longer be supported as of langchain==0.2.0. Please import from langchain-community instead:

from langchain_community.chat_models import ChatOpenAI.

To install langchain-community run pip install -U langchain-community. warnings.warn( /root/miniconda3/lib/python3.10/site-packages/gradio/components/file.py:86: UserWarning: The file_types parameter is ignored when file_count is 'directory'. warnings.warn( Running on local URL: http://127.0.0.1:7862

To create a public link, set share=True in launch(). IMPORTANT: You are using gradio version 4.20.0, however version 4.29.0 is available, please upgrade. 点击 http://127.0.0.1:7862 显示拒绝连接