PaddlePaddle / PaddleNLP

👑 Easy-to-use and powerful NLP and LLM library with 🤗 Awesome model zoo, supporting wide-range of NLP tasks from research to industrial applications, including 🗂Text Classification, 🔍 Neural Search, ❓ Question Answering, ℹ️ Information Extraction, 📄 Document Intelligence, 💌 Sentiment Analysis etc.
https://paddlenlp.readthedocs.io
Apache License 2.0
11.75k stars 2.87k forks source link

[Bug]: 端到端语义检索系统ui界面文件上传报错 #5026

Closed zhiyongLiu1114 closed 1 year ago

zhiyongLiu1114 commented 1 year ago

软件环境

- paddlepaddle:
- paddlepaddle-gpu: 2.3.1.post112
- paddlenlp: 2.5.1

重复问题

错误描述

点击上传文件后报错:
File "/usr/local/lib/python3.7/dist-packages/streamlit/scriptrunner/script_runner.py", line 554, in _run_script
    self._session_state.on_script_will_rerun(rerun_data.widget_states)
File "/usr/local/lib/python3.7/dist-packages/streamlit/state/safe_session_state.py", line 73, in on_script_will_rerun
    self._state.on_script_will_rerun(latest_widget_states)
File "/usr/local/lib/python3.7/dist-packages/streamlit/state/session_state.py", line 544, in on_script_will_rerun
    self._call_callbacks()
File "/usr/local/lib/python3.7/dist-packages/streamlit/state/session_state.py", line 557, in _call_callbacks
    self._new_widget_state.call_callback(wid)
File "/usr/local/lib/python3.7/dist-packages/streamlit/state/session_state.py", line 279, in call_callback
    callback(*args, **kwargs)
File "ui/webapp_semantic_search.py", line 60, in upload
    raw_json = upload_doc(data_file)
File "ui/utils.py", line 308, in upload_doc
    response = requests.post(url, files=files).json()
File "/usr/local/lib/python3.7/dist-packages/requests/models.py", line 975, in json
    raise RequestsJSONDecodeError(e.msg, e.doc, e.pos)

稳定复现步骤 & 代码

按照 https://github.com/PaddlePaddle/PaddleNLP/tree/develop/pipelines/examples/semantic-search 即可复现

w5688414 commented 1 year ago

后台的报错日志是啥?

zhiyongLiu1114 commented 1 year ago

后台的报错日志是啥?

我覆盖掉了,应该和错误描述是一样的。上传的文档是txt文本

w5688414 commented 1 year ago

后台的报错日志是啥?

我覆盖掉了,应该和错误描述是一样的。上传的文档是txt文本

不一样的,另外,请确保nltk能正常下载包,pipelines会下载一些nltk的依赖包

github-actions[bot] commented 1 year ago

This issue is stale because it has been open for 60 days with no activity. 当前issue 60天内无活动,被标记为stale。

github-actions[bot] commented 1 year ago

This issue was closed because it has been inactive for 14 days since being marked as stale. 当前issue 被标记为stale已有14天,即将关闭。