from fastapi import FastAPI ,Request ,Form | |
from fastapi.responses import JSONResponse | |
app = FastAPI() | |
# Root route | |
def hello_world(): | |
return "Hello World taha" | |
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}" | |