Spaces:
Sleeping
Sleeping
from fastapi import Depends, HTTPException, status | |
from fastapi import APIRouter, Query | |
from typing import Optional | |
from authentication import get_current_user | |
from apps.demand_assessment.DemandAssessment import DemandAssessment | |
router = APIRouter() | |
da = DemandAssessment() | |
def read_demand_assessment(current_user: str = Depends(get_current_user)): | |
print(da.print_data()) | |
return {"Status": "Alive!!! Hello from Demand Assessment"} | |
async def get_demand_score( | |
Region: Optional[str] = None, | |
City: str = Query(..., min_length=1), | |
District: str = Query(..., min_length=1), | |
current_user: str = Depends(get_current_user)): | |
result = da.get_demand_score(Region, City, District) | |
return result |