Spaces:
Sleeping
Sleeping
Update AgriPredict Analysis Service
Browse files
main.py
CHANGED
|
@@ -145,17 +145,23 @@ def get_data_processor() -> DataProcessor:
|
|
| 145 |
return DataProcessor()
|
| 146 |
|
| 147 |
# API Endpoints
|
| 148 |
-
@app.get("/
|
| 149 |
-
async def
|
| 150 |
-
"""
|
| 151 |
return {
|
| 152 |
-
"
|
| 153 |
-
"
|
| 154 |
-
"
|
| 155 |
-
"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 156 |
}
|
| 157 |
|
| 158 |
-
# API Endpoints
|
| 159 |
@app.get("/health")
|
| 160 |
async def health_check():
|
| 161 |
"""Health check endpoint"""
|
|
|
|
| 145 |
return DataProcessor()
|
| 146 |
|
| 147 |
# API Endpoints
|
| 148 |
+
@app.get("/")
|
| 149 |
+
async def root():
|
| 150 |
+
"""Root endpoint - provides service info for HuggingFace Spaces"""
|
| 151 |
return {
|
| 152 |
+
"service": "AgriPredict Analysis Service",
|
| 153 |
+
"status": "running",
|
| 154 |
+
"version": "1.0.0",
|
| 155 |
+
"description": "Advanced agricultural demand forecasting using ensemble ML models",
|
| 156 |
+
"endpoints": {
|
| 157 |
+
"health": "/health",
|
| 158 |
+
"docs": "/docs",
|
| 159 |
+
"forecast": "/forecast",
|
| 160 |
+
"compare": "/compare"
|
| 161 |
+
},
|
| 162 |
+
"timestamp": datetime.utcnow().isoformat()
|
| 163 |
}
|
| 164 |
|
|
|
|
| 165 |
@app.get("/health")
|
| 166 |
async def health_check():
|
| 167 |
"""Health check endpoint"""
|