Closed GwendolynKoh closed 1 year ago
解决了吗 我现在提示这个
Traceback (most recent call last):
File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\gradio\routes.py", line 393, in run_predict
output = await app.get_blocks().process_api(
File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\gradio\blocks.py", line 1069, in process_api
result = await self.call_function(
File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\gradio\blocks.py", line 892, in call_function
prediction = await anyio.to_thread.run_sync(
File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\anyio\to_thread.py", line 31, in run_sync
return await get_asynclib().run_sync_in_worker_thread(
File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread
return await future
File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\anyio\_backends\_asyncio.py", line 867, in run
result = context.run(func, *args)
File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\gradio\utils.py", line 549, in async_iteration
return next(iterator)
File "C:\Users\12051\Desktop\ChuanhuChatGPT\modules\chat_func.py", line 270, in predict
from llama_index.indices.vector_store.base_query import GPTVectorStoreIndexQuery
ModuleNotFoundError: No module named 'llama_index.indices.vector_store.base_query'
解决了吗 我现在提示这个
Traceback (most recent call last): File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\gradio\routes.py", line 393, in run_predict output = await app.get_blocks().process_api( File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\gradio\blocks.py", line 1069, in process_api result = await self.call_function( File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\gradio\blocks.py", line 892, in call_function prediction = await anyio.to_thread.run_sync( File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\anyio\to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\anyio\_backends\_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\anyio\_backends\_asyncio.py", line 867, in run result = context.run(func, *args) File "C:\Users\12051\AppData\Roaming\Python\Python38\site-packages\gradio\utils.py", line 549, in async_iteration return next(iterator) File "C:\Users\12051\Desktop\ChuanhuChatGPT\modules\chat_func.py", line 270, in predict from llama_index.indices.vector_store.base_query import GPTVectorStoreIndexQuery ModuleNotFoundError: No module named 'llama_index.indices.vector_store.base_query'
你这个问题,在常见问题里面就明确写了,在此不在重复,根本不是同一个问题,请勿捣乱。
上传图片的更是一片乱码,应该是上图这里出了问题?上传图片后就只能看到这么多东西了
F:\anaconda3\envs\chatgpt\lib\site-packages\langchain\llms\openai.py:608: UserWarning: You are trying to use a chat model. This way of initializing it is no longer supported. Instead, please use: from langchain.chat_models import ChatOpenAI
你用的是最新版代码吗?你的这个报错应该是llama_index 0.5.5版本带来的,最新的代码已经做好了适配。
你用的是最新版代码吗?你的这个报错应该是llama_index 0.5.5版本带来的,最新的代码已经做好了适配。
我十分肯定确定是最新版的代码,连hugface都是同样的错误。。已经无解了
仍然无效的
chatgpt的回答,问题是我的pdf就是一个正常的a4论文。。。。
换了只有一页ppt 的pdf后可以打开了,具体大佬可不可以说一下pdf的限制是什么我,因为想导入长篇文字的论文。 然而上传图片仍然错误
关于pdf:
关于图片:
请问大佬们具体pdf的要求是怎么样的呢?我现在就是烧香拜佛,让他读论文的pdf,无论长短都没有成功过。。。。。救命啊!!!
你先换用一些兄弟软件试试吧……类似的开源的还蛮多的吧……看看他们行不行,如果他们可以我们不行可能是我们的问题
把modules/pdf_func.py中的get_title_with_cropped_page函数简单修改一下试试
def get_title_with_cropped_page(first_page):
title = [] # 处理标题
x0,top,x1,bottom = first_page.bbox # 获取页面边框
for word in extract_words(first_page):
word = SimpleNamespace(**word)
if word.size >= 14:
title.append(word.text)
title_bottom = word.bottom
elif word.text == "Abstract": # 获取页面abstract
title_top = word.top
user_info = [i["text"] for i in extract_words(first_page.within_bbox((x0,top,x1,bottom)))]
# 裁剪掉上半部分, within_bbox: full_included; crop: partial_included
return title, user_info, first_page.within_bbox((x0,top,x1,bottom))
对, 有的pdf其实是有文本的, 但是会说找不到root, 然后就寄了. 从pdf中提取文本, 行业标准的方案是什么啊?
是否已存在现有反馈与解答?
是否是一个代理配置相关的疑问?
错误描述
复现操作
1.花了我一天的时间,终于学会了吧 requirements.txt 的llama_index==0.5.5删除,然后pip install 并所有upgrade 消除了llama_index常见问题中langchain的问题 2.然后心满意足地在凌晨5点钟终于尝试开始睡觉,醒来后,第一时间想着打开新世界的大门然而并没有。
错误日志
运行环境
补充说明
具体的操作是: 1.调用 python .\ChuanhuChatbot.py 2.复制黏贴 api-key 3.上传索引文件 4.输入“你好”