adsurkasur commited on
Commit
936e98d
·
verified ·
1 Parent(s): 8481342

Update AgriPredict Analysis Service

Browse files
Files changed (1) hide show
  1. main.py +14 -8
main.py CHANGED
@@ -145,17 +145,23 @@ def get_data_processor() -> DataProcessor:
145
  return DataProcessor()
146
 
147
  # API Endpoints
148
- @app.get("/health")
149
- async def health_check():
150
- """Health check endpoint"""
151
  return {
152
- "status": "healthy",
153
- "service": "analysis-service",
154
- "timestamp": datetime.utcnow().isoformat(),
155
- "version": "1.0.0"
 
 
 
 
 
 
 
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"""