Hinglish_FastAPI / main.py
Rohan Kumar Singh
changes
aa79f88
raw
history blame
292 Bytes
from fastapi import FastAPI
from inference import outcome
import warnings
warnings.filterwarnings("ignore")
app=FastAPI()
@app.get('/')
def index():
return {"message":"Welcome to Hinglish Translator"}
@app.post('/predict')
def predict(input: str):
return {"result":outcome(input)}