File size: 292 Bytes
65d4d2c
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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)}