Spaces:
Sleeping
Sleeping
fix (changing sse mounting location)
Browse files
app.py
CHANGED
|
@@ -254,23 +254,20 @@ LOCATIONS = {
|
|
| 254 |
# FASTAPI APPLICATION
|
| 255 |
# ============================================================================
|
| 256 |
|
| 257 |
-
app = FastAPI(
|
| 258 |
-
|
| 259 |
-
|
| 260 |
-
|
| 261 |
-
)
|
| 262 |
-
|
| 263 |
-
# CORS configuration - allow all for development
|
| 264 |
-
app.add_middleware(
|
| 265 |
-
|
| 266 |
-
|
| 267 |
-
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
)
|
| 271 |
-
|
| 272 |
-
# Exposing endpoint for sse
|
| 273 |
-
app.mount("/mcp", sse_app)
|
| 274 |
|
| 275 |
# ============================================================================
|
| 276 |
# GLOBAL STATE
|
|
@@ -347,6 +344,10 @@ app.add_middleware(
|
|
| 347 |
allow_headers=["*"],
|
| 348 |
)
|
| 349 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 350 |
# ============================================================================
|
| 351 |
# API ENDPOINTS
|
| 352 |
# ============================================================================
|
|
|
|
| 254 |
# FASTAPI APPLICATION
|
| 255 |
# ============================================================================
|
| 256 |
|
| 257 |
+
# app = FastAPI(
|
| 258 |
+
# title="Farmer.chat Alert Summary API",
|
| 259 |
+
# description="Agricultural intelligence system with alert-focused MCP pipeline",
|
| 260 |
+
# version="2.0.0"
|
| 261 |
+
# )
|
| 262 |
+
|
| 263 |
+
# # CORS configuration - allow all for development
|
| 264 |
+
# app.add_middleware(
|
| 265 |
+
# CORSMiddleware,
|
| 266 |
+
# allow_origins=["*"],
|
| 267 |
+
# allow_credentials=True,
|
| 268 |
+
# allow_methods=["*"],
|
| 269 |
+
# allow_headers=["*"],
|
| 270 |
+
# )
|
|
|
|
|
|
|
|
|
|
| 271 |
|
| 272 |
# ============================================================================
|
| 273 |
# GLOBAL STATE
|
|
|
|
| 344 |
allow_headers=["*"],
|
| 345 |
)
|
| 346 |
|
| 347 |
+
|
| 348 |
+
# Exposing endpoint for sse
|
| 349 |
+
app.mount("/mcp", sse_app)
|
| 350 |
+
|
| 351 |
# ============================================================================
|
| 352 |
# API ENDPOINTS
|
| 353 |
# ============================================================================
|