Closed rh920 closed 6 days ago
This project uses Hugging Face's cached models and can operate in offline mode by setting HF_HUB_OFFLINE
environment variable, which will prevent models from being downloaded.
To use offline mode, you need to pre-download the models. You can do this by running the project to download the models or by using the huggingface-cli download
command (recommended).
The downloaded cache follows a dedicated folder structure; see manage-cache for details.
You can also change the default cache location by setting the XDG_CACHE_HOME
environment variable.
After further try, it not only downloads models online but also fetches fonts from GitHub. If you want to run it completely offline, you can use the Docker image I created, which includes a Compose example.
After further try, it not only downloads models online but also fetches fonts from GitHub. If you want to run it completely offline, you can use the Docker image I created, which includes a Compose example.
Thanks a lot. There was range of docker compose file in your repository. Do you know anything about finetuning recognition model?
After further try, it not only downloads models online but also fetches fonts from GitHub. If you want to run it completely offline, you can use the Docker image I created, which includes a Compose example.
Thanks a lot. There was range of docker compose file in your repository. Do you know anything about finetuning recognition model?
No, I haven't actually done it.
I want to use surya-ocr offline. I have downloaded models
DETECTOR_MODEL_CHECKPOINT
andRECOGNITION_MODEL_CHECKPOINT
and updated OCR (text recognition) script as shown bellow. However, the script still attemps to downloadvikp/surya_rec2
I found that in
surya.model.recognition.processor.load_processor
there is a class namedSuryaProcessor
, that uses RECOGNITION_MODEL_CHECKPOINT. I suggest modifying load_processor to accept RECOGNITION_MODEL_CHECKPOINT as an input argument to specify the model path.Alternatively, if there is a better solution to ensure the script runs without internet access, I would appreciate your guidance.