Spaces:
Build error
Build error
| import os | |
| from fastapi import FastAPI | |
| from fastapi.staticfiles import StaticFiles | |
| from fastapi.responses import FileResponse | |
| import uvicorn | |
| app = FastAPI() | |
| # مسارات الـ API (تأكد من وجود منطق الـ Orchestrator هنا لاحقاً) | |
| def get_status(): | |
| return {"status": "AI Engines are Ready"} | |
| # خدمة ملفات الواجهة الثابتة | |
| # هذا الجزء هو المسؤول عن استبدال رسالة الـ JSON بواجهتك | |
| static_path = "/app/static_ui" | |
| if os.path.exists(static_path): | |
| app.mount("/", StaticFiles(directory=static_path, html=True), name="static") | |
| if __name__ == "__main__": | |
| port = int(os.environ.get("PORT", 7860)) | |
| uvicorn.run(app, host="0.0.0.0", port=port) | |