liuyixin-louis / OpenChatPaper

Yet another paper reading assistant based on OpenAI ChatGPT API. An open-source version that attempts to reimplement ChatPDF. A different dialogue version of another ChatPaper project.
https://huggingface.co/spaces/yixin6178/ChatPaper
BSD 2-Clause "Simplified" License
168 stars 17 forks source link

FileNotFoundError: [Errno 2] No such file or directory: '/app/ckpt/embedding_cache_distiluse-base-multilingual-cased-v2.pkl' #7

Closed MathiasSong closed 1 year ago

MathiasSong commented 1 year ago

I am trying to run this app in wsl ubuntu with python 3.9. I am unable to run backend.py with the following messages. Could you please help me what I can do?


Traceback (most recent call last): File "/home/matt_song/projects/OpenChatPaper/backend.py", line 12, in embedding_model = HuggingfaceSentenceTransformerModel() File "/home/matt_song/projects/OpenChatPaper/embedding_model.py", line 15, in init super().init(model_name) File "/home/matt_song/projects/OpenChatPaper/base_class.py", line 30, in init with open(embedding_cache_path, "wb") as embedding_cache_file: FileNotFoundError: [Errno 2] No such file or directory: '/app/ckpt/embedding_cache_distiluse-base-multilingual-cased-v2.pkl'

musalih commented 1 year ago

The code is looking for a /app/ckpt/ directory which doesn't exist. I'm assuming it was created locally and the .pkl file was placed in. To fix this set embedding_cache_path in base_class.py line 22 to f"{model_name}.pkl". You'll need to do the same thing on line 46 f"{db_name}.pkl"

liuyixin-louis commented 1 year ago

Please change the checkpoint path for your own server.

liuyixin-louis commented 1 year ago

Please note that I have updated the code now. So you wouldn't face this problem no matter you are using window or linux.