pdfGPT
pdfGPT copied to clipboard
error cant create file already exists
Everytime I try to load a local PDF, it answers the first question, but after that it errors out with "cant create file that already exists".
could you please try now. I had added a temporary embeddings file which was causing this error. Now I am able to run it correctly:

Did you fix the source code also so I could try it locally?
yes, please get the latest code
I just pulled the latest code and am also experiencing this issue. "FileExistsError: [WinError 183] Cannot create a file when that file already exists: "
Please use this file https://huggingface.co/spaces/bhaskartripathi/pdfChatter/blob/main/app.py
Please use this file https://huggingface.co/spaces/bhaskartripathi/pdfChatter/blob/main/app.py
Thank you. I just tried and still have the same error.
The error you are getting is because the earlier code was checking if the embedding is created and save temporarily, it is not reloaded. This can save the computational effort of creating embedding on every call. However, as that code had some issue, I had removed that from the latest version. It looks like you are still using the previous code. Could you plz do a viewdiff ?
I just copied the text from the link you sent and ran it. It has the changes indicated by hugginface on lines 52 and 188. Line 52: chunk = f'[Page no. {idx+start_page}]' + ' ' + '"' + chunk + '"' Is this the correct version?
Yes that is correct
the error still happens after a while
I have tried it again and again but Not able to replicate it anymore.