File size: 406 Bytes
efd486d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
from fastapi import FastAPI
from app.routes import prediction
from app.routes.prediction import predict
from app.routes import home
import gradio as gr
app = FastAPI()
app.include_router(
home.router,
tags=["home"],
)
app.include_router(
prediction.router,
prefix="/predict",
tags=["prediction"],
)
iface = gr.Interface(fn=predict, inputs="text", outputs="text")
iface.launch()
|