Spaces:
Sleeping
Sleeping
from typing import Union | |
from src.utils import make_incredible_predictions | |
from fastapi import FastAPI | |
app = FastAPI() | |
# /docs, page to see auto-generated API documentation | |
def read_root(): | |
return {"Hello": "World", "cohort": "2"} | |
def read_item(item_id: int, q: Union[str, None] = None): | |
return {"item_id": item_id, "q": q} | |
def predict(age, salary, dependentsNumber, gender): | |
prediction = None | |
# prediction = model.predict(pd.DataFrame([age, salary, dependents_number, gender])) | |
return {"age":age, | |
"salary":salary, | |
"dependents_number":dependentsNumber, | |
"gender":gender,"prediction":prediction} | |
def predict(age, salary, dependentsNumber, gender): | |
prediction = None | |
# prediction = model.predict(pd.DataFrame([age, salary, dependents_number, gender])) | |
return {"age":age, | |
"salary":salary, | |
"dependents_number":dependentsNumber, | |
"gender":gender,"prediction":prediction} |