EALPR_FLASK / config.py
Pant0x's picture
Update API URLs to point to Hugging Face Backend and support HF_TOKEN
668cd87
Raw
History Blame Contribute Delete
595 Bytes
import os
from dotenv import load_dotenv
load_dotenv(override=True)
class Config:
SECRET_KEY = os.getenv("FLASK_SECRET_KEY", "fallback-dev-key")
BACKEND_API_URL = os.getenv("BACKEND_API_URL", "https://pant0x-ain-el-aql-backend.hf.space")
ESP_GATE_URL = os.getenv("ESP_GATE_URL", "http://192.168.1.100/open")
PLATE_COOLDOWN_SECONDS = int(os.getenv("PLATE_COOLDOWN_SECONDS", "3"))
CAMERA_SOURCE = os.getenv("CAMERA_SOURCE", "0")
# If CAMERA_SOURCE is numeric string, convert to int
try:
CAMERA_SOURCE = int(CAMERA_SOURCE)
except ValueError:
pass