tmp4 / app.py
LapStore
uploaded
e8e0c83
raw
history blame
445 Bytes
from fastapi import FastAPI ,Request ,Form
from fastapi.responses import JSONResponse
app = FastAPI()
# Root route
@app.get('/')
def hello_world():
return "Hello World taha"
@app.post('/predict')
def predict(name: str = Form(...),age: str = Form(...)): # Form(...) to accept input as web form ,may change when android /upload
# Return the submitted 'image' value as the prediction
return f"Your name is {name} \n age is {age}"