Spaces:
Sleeping
Sleeping
| import os | |
| from pathlib import Path | |
| os.environ.setdefault("GRADIO_ANALYTICS_ENABLED", "False") | |
| from src import config | |
| from src.ui.components import build_app | |
| app = build_app() | |
| if __name__ == "__main__": | |
| port = int(os.environ.get("GRADIO_SERVER_PORT", os.environ.get("PORT", "7860"))) | |
| project_root = Path(__file__).resolve().parent | |
| app.launch( | |
| server_name="0.0.0.0", | |
| server_port=port, | |
| allowed_paths=[str(project_root / "assets"), str(config.ENROLLMENT_IMAGES_DIR)], | |
| show_api=False, | |
| ) | |