-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Wondering #5
Comments
Because this project requires Nvidia driver support, if your computer doesn’t have an NVIDIA graphics card, then I might not be able to help you. If you solve the graphics card issue, you can use WSL2 to run this project on Windows. I just successfully ran this project on WSL2 yesterday, so I can offer some advice.
If you also plan to use WSL2 for running the project and encounter any problems during deployment, feel free to reply to this ISSUE. Maybe I have come across similar issues before. |
Thank you so much man! I've struggled with this for 20+ hours and have gotten far, but now I'm really locked on this current error.. |
"ImportError: cannot import name 'OpenAi' from 'openai' (/usr/local/lib/python3.10/dist-packages/openai/init.py)" |
Hahaha, I've encountered this problem. The default installed version of openai is the 0.1x.x version, which is too outdated, as the latest versions are already at 1.14.x. There's a significant difference between the default installation and the current versions. I manually upgraded openai in the Dockerfile: RUN pip install -r requirements.txt
RUN pip install "git+https://github.com/facebookresearch/detectron2.git"
# Added this line
RUN pip uninstall openai -y && pip install openai --upgrade Perhaps you could also modify
|
Huh. I've just tried both those methods and it comes up with the same error. Is there any other way to do it? |
After you modified the Dockerfile, did you run There might be one thing that is slightly different because I am in China, I usually switch the PyPI registry to one within China. This might differ from your registry since different registries might have different versions of packages available. Can you confirm if the version of the openai package after upgrading is 1.14?
RUN pip uninstall openai && pip install openai --upgrade
You can search for an available registry and add a
Then modify the docker image’s PyPi registry: COPY pip.conf /etc/pip.conf
COPY pip.conf /root/.pip/pip.conf |
Hmm, now I'm getting this error in docker? /usr/local/lib/python3.10/dist-packages/onnxruntime/capi/onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider' |
Modify according to the following diff content, and there is no need to recompile the docker image. After modification, just
|
Dude you are amazing, thank you so much. |
You must have modified the source code, as the openai package you're using is different from mine; thus, I haven't encountered the program error that you mentioned, sorry. response = self.client.chat.completions.create |
Dunky you are the MVP. I didn't get to use it on Windows, can't get it to work. But I've installed ubuntu and now it's running. Some pages are making a ZeroDivisionError: Division by zero though, so it's not flawless. I only get it on some pages, so I'm guessing it's something with this: |
I've also encountered this if line_cnt == 0:
return 'TimesNewRoman.ttf', font_size, ygain
font_size = height / line_cnt |
You are literally the man (or woman)! |
Thank you, I'm glad I could help. I'm male by the way. Currently, my need is simply for reading the literature; there is no requirement to edit the text. If editing were necessary, then using another OCR tool would indeed be the only option. |
Hey Dunky. I'm encountering this error/warning when translating a PDF file from Arabic to English on Windows WSL Kali linux distro build on a RTX 4070 after following all the necessary steps. The error I get is this:
Have you encountered this warning? What's the cause of this and is there a fix? |
Sorry, I have not encountered this error before and may not be able to help you. Could you please provide more error logs to facilitate troubleshooting? # This line is the reason for the error, but with only one line it cannot be determined.
# Please check the logs above this line.
unknown: figure
# The following lines are warning messages,
# and will not cause the program to terminate.
# However, in conjunction with the error message "unknown: figure",
# there may be an issue with processing images in the PDF.
232it [05:15, 1.34s/it]/home/kali/pdf_translator/lib/python3.11/site-packages/torch/utils/checkpoint.py:460: UserWarning: torch.utils.checkpoint: please pass in use_reentrant=True or use_reentrant=False explicitly. The default value of use_reentrant will be updated to be False in the future. To maintain current behavior, pass use_reentrant=True. It is recommended that you use use_reentrant=False. Refer to docs for more details on the differences between the two variants.
warnings.warn(
/home/kali/pdf_translator/lib/python3.11/site-packages/torch/utils/checkpoint.py:90: UserWarning: None of the inputs have requires_grad=True. Gradients will be None
warnings.warn(
0it [00:00, ?it/s]
0it [00:00, ?it/s]
233it [05:17, 1.34s/it]/home/kali/pdf_translator/lib/python3.11/site-packages/torch/utils/checkpoint.py:460: UserWarning: torch.utils.checkpoint: please pass in use_reentrant=True or use_reentrant=False explicitly. The default value of use_reentrant will be updated to be False in the future. To maintain current behavior, pass use_reentrant=True. It is recommended that you use use_reentrant=False. Refer to docs for more details on the differences between the two variants.
warnings.warn(
/home/kali/pdf_translator/lib/python3.11/site-packages/torch/utils/checkpoint.py:90: UserWarning: None of the inputs have requires_grad=True. Gradients will be None
warnings.warn(
1it [00:00, 48210.39it/s]
1it [00:00, 91180.52it/s]
0it [00:00, ?it/s] |
My only guess is in trying to translate a short pdf file from Arabic to English. I guess it doesn't recognize the Arabic hence the unknown figure error. |
Is there ANY way to run this on a Windows? For the love of me I can't get make commands to work in windows, and i've tried Linux Lite on a flash drive but couldn't get the NVidia drivers running.
If you could give me any pointers I'd be so grateful
The text was updated successfully, but these errors were encountered: