github-actions[bot]
Deploy Backend to Hugging Face Space (cd6fa289779b953d2aec0e717f568ed39f702154)
1810ba0 Download deploy_app.py from ThEyAtH/EUDORA: direct link, hf CLI and curl.
- Browser
- Download file 661 Bytes
-
https://huggingface.co/spaces/ThEyAtH/EUDORA/resolve/main/deploy_app.py
- Command line
-
hf download hf://spaces/ThEyAtH/EUDORA/deploy_app.py
-
curl -L -o deploy_app.py https://huggingface.co/spaces/ThEyAtH/EUDORA/resolve/main/deploy_app.py
661 Bytes
| from pathlib import Path | |
| import importlib.util | |
| import sys | |
| from main import app | |
| PROJECT_ROOT = Path(__file__).resolve().parent | |
| ORCHESTRATOR_DIR = PROJECT_ROOT / "qwen-orchestrator" | |
| def _load_orchestrator_app(): | |
| sys.path.insert(0, str(ORCHESTRATOR_DIR)) | |
| spec = importlib.util.spec_from_file_location( | |
| "eudora_orchestrator_app", | |
| ORCHESTRATOR_DIR / "app.py", | |
| ) | |
| if spec is None or spec.loader is None: | |
| raise RuntimeError("Could not load orchestrator app") | |
| module = importlib.util.module_from_spec(spec) | |
| spec.loader.exec_module(module) | |
| return module.app | |
| app.mount("/orchestrator", _load_orchestrator_app()) | |