Spaces:
Sleeping
Sleeping
Update api.py
Browse files
api.py
CHANGED
|
@@ -240,11 +240,11 @@ async def rag_classify(query: DiseaseQuery):
|
|
| 240 |
class GeoSenQuery(BaseModel):
|
| 241 |
region: str
|
| 242 |
crop_type: str
|
| 243 |
-
|
| 244 |
soil_pH: float
|
| 245 |
temperature_C: float
|
| 246 |
rainfall_mm: float
|
| 247 |
-
|
| 248 |
sunlight_hours: float
|
| 249 |
irrigation_type: str
|
| 250 |
fertilizer_type: str
|
|
@@ -257,8 +257,8 @@ class GeoSenQuery(BaseModel):
|
|
| 257 |
@app.post("/GeoSensor")
|
| 258 |
async def geo_sensor_classify(query: GeoSenQuery):
|
| 259 |
try:
|
| 260 |
-
logits = predict_crop_disease([query.region,query.crop_type,query.
|
| 261 |
-
query.rainfall_mm,query.
|
| 262 |
query.pesticide_usage_ml,query.total_days,query.yield_kg_per_hectare,query.latitude,query.longitude,
|
| 263 |
query.NDVI_index])
|
| 264 |
|
|
|
|
| 240 |
class GeoSenQuery(BaseModel):
|
| 241 |
region: str
|
| 242 |
crop_type: str
|
| 243 |
+
soil_moisture: float
|
| 244 |
soil_pH: float
|
| 245 |
temperature_C: float
|
| 246 |
rainfall_mm: float
|
| 247 |
+
humidity: float
|
| 248 |
sunlight_hours: float
|
| 249 |
irrigation_type: str
|
| 250 |
fertilizer_type: str
|
|
|
|
| 257 |
@app.post("/GeoSensor")
|
| 258 |
async def geo_sensor_classify(query: GeoSenQuery):
|
| 259 |
try:
|
| 260 |
+
logits = predict_crop_disease([query.region,query.crop_type,query.soil_moisture,query.soil_pH,query.temperature_C,
|
| 261 |
+
query.rainfall_mm,query.humadity,query.sunlight_hours,query.irrigation_type,query.fertilizer_type,
|
| 262 |
query.pesticide_usage_ml,query.total_days,query.yield_kg_per_hectare,query.latitude,query.longitude,
|
| 263 |
query.NDVI_index])
|
| 264 |
|