arnabkar101/dotsocr-space
0
Local Development Setup (Python 3.12)
- Ensure Python 3.12 is available (
pyenv install 3.12.5or via system package manager). - Create a virtualenv:
python3.12 -m venv .venv && source .venv/bin/activate. - Upgrade packaging tools:
pip install --upgrade pip wheel setuptools. - Install dependencies:
pip install -r requirements.txt. - (Optional) Authenticate with Hugging Face if you plan to call gated models:
huggingface-cli login. - Run locally:
python app.pyand open the printed Gradio URL.
Push to a New Hugging Face Space
- Log in:
huggingface-cli login(stores your token locally). - Create a Space (replace
YOUR_USER):
from huggingface_hub import HfApi
api = HfApi()
api.create_repo("YOUR_USER/dotsocr-space", repo_type="space", space_sdk="gradio")- Upload this folder:
api.upload_folder(
repo_id="YOUR_USER/dotsocr-space",
repo_type="space",
folder_path="space_app"
)- In the Space settings UI, confirm hardware =
Nvidia A10G - Smalland Python = 3.12. - Restart the Space and monitor the build logs; once green, test via the Space URL.
