Spaces:
Building
Building
Update app.py
Browse files
app.py
CHANGED
@@ -1,31 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
from fastapi import FastAPI
|
2 |
-
from fastapi.staticfiles import StaticFiles
|
3 |
import uvicorn
|
4 |
-
from utils import log
|
5 |
|
6 |
-
from
|
7 |
-
|
8 |
-
from auth_controller import router as auth_router
|
9 |
-
from config_controller import router as config_router
|
10 |
-
from project_controller import router as project_router
|
11 |
-
from spark_controller import router as spark_router
|
12 |
-
from test_controller import router as test_router
|
13 |
-
from api_controller import router as api_router
|
14 |
|
15 |
-
app = FastAPI(
|
16 |
-
|
|
|
|
|
|
|
17 |
|
|
|
18 |
@app.get("/")
|
19 |
def health_check():
|
20 |
return {"status": "ok"}
|
21 |
|
22 |
-
|
23 |
-
app.include_router(
|
24 |
-
app.include_router(project_router, prefix="/project")
|
25 |
-
app.include_router(spark_router, prefix="/spark")
|
26 |
-
app.include_router(test_router, prefix="/test")
|
27 |
-
app.include_router(api_router, prefix="/api")
|
28 |
|
29 |
if __name__ == "__main__":
|
30 |
-
log("🌐 Starting Flare
|
31 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|
|
|
1 |
+
"""Flare – Minimal backend bootstrap (no UI controllers)
|
2 |
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
3 |
+
Yalnızca sağlık kontrolü, session ve chat endpoint’leri içerir.
|
4 |
+
UI controller’ları tamamlandığında yeniden eklenecek.
|
5 |
+
"""
|
6 |
+
|
7 |
from fastapi import FastAPI
|
|
|
8 |
import uvicorn
|
|
|
9 |
|
10 |
+
from utils import log
|
11 |
+
from chat_handler import router as chat_router # ← start_session & chat
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
+
app = FastAPI(
|
14 |
+
title="Flare Orchestration Service",
|
15 |
+
version="0.1.0",
|
16 |
+
description="LLM-driven intent & API flow engine (bootstrap)",
|
17 |
+
)
|
18 |
|
19 |
+
# ---------------- Health probe (HF Spaces watchdog) -----------------
|
20 |
@app.get("/")
|
21 |
def health_check():
|
22 |
return {"status": "ok"}
|
23 |
|
24 |
+
# ---------------- Core chat/session routes --------------------------
|
25 |
+
app.include_router(chat_router)
|
|
|
|
|
|
|
|
|
26 |
|
27 |
if __name__ == "__main__":
|
28 |
+
log("🌐 Starting Flare backend …")
|
29 |
uvicorn.run(app, host="0.0.0.0", port=7860)
|