realstate / app.py
sanbatte's picture
file must be app.py
b8f1623
raw
history blame
406 Bytes
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()