Spaces:
Runtime error
Runtime error
| import os | |
| from pathlib import Path | |
| # Root directory of the repository | |
| ROOT_DIR = Path(__file__).resolve().parent.parent | |
| # Paths and runtime settings | |
| MODEL_PATH = Path(os.getenv("LIPNET_MODEL_PATH", ROOT_DIR / "best_model_1_WER.keras")) | |
| MAX_VIDEO_SIZE_MB = int(os.getenv("MAX_VIDEO_SIZE_MB", "1000")) | |
| SERVER_PORT = int(os.getenv("PORT", "7860")) | |
| SHARE_PUBLIC = os.getenv("GRADIO_SHARE", "false").lower() == "true" | |
| # Preprocessing settings | |
| TARGET_SIZE = int(os.getenv("LIPNET_TARGET_SIZE", "85")) | |
| MAX_FRAMES = int(os.getenv("LIPNET_MAX_FRAMES", "160")) | |
| DETECTION_CONFIDENCE = float(os.getenv("LIPNET_DETECTION_CONFIDENCE", "0.5")) | |
| TRACKING_CONFIDENCE = float(os.getenv("LIPNET_TRACKING_CONFIDENCE", "0.5")) | |