test / main.py
iceberg0142's picture
.
ddd3ad6
raw
history blame contribute delete
353 Bytes
from fastapi import FastAPI
import gradio as gr
app = FastAPI()
@app.get("/predict")
def read_main():
return {"message": "This is your main app"}
io = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")
app = gr.mount_gradio_app(app, io, path="/")
# # Launch the app (which will be hosted on Hugging Face Spaces)
# io.launch()