Spaces:
Running on Zero
Running on Zero
| title: Othaim ALPR API | |
| emoji: π ΏοΈ | |
| colorFrom: green | |
| colorTo: indigo | |
| sdk: gradio | |
| sdk_version: 5.16.0 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| # Othaim Parking ALPR - Backend API | |
| FastAPI backend for the Othaim Markets parking management system, mounted with Gradio for free hosting on Hugging Face Spaces. | |
| > Check out the HF Spaces configuration reference at [huggingface.co/docs/hub/spaces-config-reference](https://huggingface.co/docs/hub/spaces-config-reference). | |
| --- | |
| ## How ALPR Works (No Local Models Needed) | |
| This backend does **not** require local model files (`car_plate_best.pt`, `model_ocr.pt`) in production. | |
| * **Remote Mode (Default):** Set `MODEL_INFERENCE_PROVIDER=remote`. The backend sends images to the pre-deployed model Space at `pant0x-ealpr-ocr-v2.hf.space` and returns the results. | |
| * **Local Mode:** Model files in the repo are intended for **local development** when running with `MODEL_INFERENCE_PROVIDER=local`. | |
| --- | |
| ## Environment Variables & Secrets | |
| | Secret | Required | Default | Description | | |
| |---|:---:|---|---| | |
| | `SUPABASE_URL` | β | β | Supabase project URL | | |
| | `SUPABASE_ANON_KEY` | β | β | Supabase anonymous key | | |
| | `SUPABASE_SERVICE_ROLE_KEY` | β | β | Supabase service role key | | |
| | `CORS_ALLOW_ORIGINS` | β | `*` | Allowed CORS origins | | |
| | `MODEL_INFERENCE_PROVIDER` | β | `remote` | `remote` (calls HF Space) or `local` | | |
| | `MODEL_SERVICE_URL` | β | `https://pant0x-ealpr-ocr-v2.hf.space` | Remote ALPR model URL | | |
| --- | |
| ## API Endpoints | |
| - `/docs` β Interactive Swagger UI documentation | |
| - `/health` β Health check status endpoint | |
| - `/predict` β License plate recognition inference | |
| - All 42 REST API endpoints are active and accessible via the Space wrapper. |