doctr
doctr copied to clipboard
[api] Add support of PDF / multi-image inputs in the API template
Currently, as specified in #609, the API template only supports single image input. With the latest version of docTR, it would be quite easy to change this to support PDF and multiple image inputs.
Hey, can I start off working on this in case no one has ?
Hey, can I start off working on this in case no one has ?
Sure :)
@nikokks Still on it ? :)
I apologize for the delay in responding to your request. Due to prior commitments, I was unable to attend to this matter sooner.
When attempting to install the required packages, I encountered an issue with the version dependency constraints of tensorflow-macos
. This incompatibility prevented the installation of other essential Python packages. Has anyone else come across the issue ?
Fixes I have tried:
- Removing the version constraint for tf in the requirements file
- Changing python to version 3.8 and 3.9
Just adding the initial error message for reference here
ERROR: Could not find a version that satisfies the requirement tensorflow==2.12.0 (from versions: 2.13.0rc0, 2.13.0rc1, 2.13.0rc2, 2.13.0, 2.13.1, 2.14.0rc0, 2.14.0rc1, 2.14.0, 2.14.1, 2.15.0rc0, 2.15.0rc1, 2.15.0)
ERROR: No matching distribution found for tensorflow==2.12.0
Hey @SkaarFacee 👋
Mh good question ^^ But from the traceback what happens if you pin TensorFlow to 2.13 or 2.14 or 2.15 ?
Hey @felixdittrich92 :) When I try TensorFlow 2.13, I get conflicting dependencies. I tried with Tensorflow 2.14 as it had smaller amount of conflicting dependencies. That worked perfectly fine.
Thanks :)
Hey @felixdittrich92 :) When I try TensorFlow 2.13, I get conflicting dependencies. I tried with Tensorflow 2.14 as it had smaller amount of conflicting dependencies. That worked perfectly fine.
Thanks :)
Mh crazy 😅 Unfortunately i can't test it without a Mac.. but nice that it works now 😊
I came across another issue 😢 While trying run the api locally with the command
uvicorn --reload --workers 1 --host 0.0.0.0 --port=8002 --app-dir api/ app.main:app
I get the error saying
File "/Users/adi/Skaarfacee/doctr/api/app/config.py", line 8, in <module>
import doctr
ModuleNotFoundError: No module named 'doctr
When I try importing doctr in my virtual env, it does get imported successfully
Mhh...
cd doctr/api
uvicorn app.main:app --reload --workers 1 --host 0.0.0.0 --port 8080
Does not work ?
I'll give that a try and report back on the results. While I remember trying that and then encountering an error before, I'm not entirely clear on the specific details of the error. I'll do my best to investigate further and provide an update as soon as possible.
Hey @felixdittrich92, I did try running the command and it led to the same error :/
Hey, I am still stuck with this error. reinstalling the virtual env and that did not help the issue either
Hey @SkaarFacee :wave:,
Sry for the late response, but if you run it as described in https://github.com/mindee/doctr/blob/main/api/README.md it runs without issues ?
Yes, I did try that, I did create the environment using conda and then used pip. Could that be the problem ? I used anaconda to switch between python versions easily
Hey @SkaarFacee :wave:
pip on conda works fine but check that you use the correct env if you start the api (If you use VSCode you can also see which interpreter is used (with conda it shows also which env is used)
conda list python-doctr
python3 ...