File size: 762 Bytes
0877242
 
7dc4b6d
 
 
0877242
 
 
7dc4b6d
 
 
 
 
 
 
 
 
 
0877242
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
import os
from fastapi import FastAPI
from fastapi.staticfiles import StaticFiles
from fastapi.responses import FileResponse
import uvicorn

app = FastAPI()

# مسارات الـ API (تأكد من وجود منطق الـ Orchestrator هنا لاحقاً)
@app.get("/api/status")
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)