Spaces:
Sleeping
Sleeping
Download iris/api/main.py from NextNeural/IRIS: direct link, hf CLI and curl.
- Browser
- Download file 874 Bytes
-
https://huggingface.co/spaces/NextNeural/IRIS/resolve/main/iris/api/main.py
- Command line
-
hf download hf://spaces/NextNeural/IRIS/iris/api/main.py
-
curl -L -o main.py https://huggingface.co/spaces/NextNeural/IRIS/resolve/main/iris/api/main.py
874 Bytes
| from __future__ import annotations | |
| from fastapi import FastAPI | |
| from iris.api.routes import router | |
| from iris.config import Settings | |
| from iris.pipeline.orchestrator import VideoProcessor | |
| from iris.storage.database import Database | |
| from iris.storage.files import FileStore | |
| def create_app(settings: Settings | None = None) -> FastAPI: | |
| app_settings = settings or Settings.from_env() | |
| app_settings.ensure_directories() | |
| database = Database(app_settings.database_path) | |
| database.init() | |
| file_store = FileStore(app_settings) | |
| processor = VideoProcessor(app_settings, database, file_store) | |
| app = FastAPI(title="IRIS", version="0.1.0") | |
| app.state.settings = app_settings | |
| app.state.database = database | |
| app.state.file_store = file_store | |
| app.state.video_processor = processor | |
| app.include_router(router) | |
| return app | |
| app = create_app() | |