Spaces:
Running
Running
File size: 362 Bytes
155b533 47058bf 155b533 47058bf 155b533 47058bf 155b533 47058bf |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
from fastapi import FastAPI
import gradio as gr
print("DEBUG: app2.py starting")
app = FastAPI()
@app.get("/")
def read_main():
return {"message": "This is your main app"}
io = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")
print(f"DEBUG: io={io}")
app = gr.mount_gradio_app(app, io, path="/gradio")
print(f"DEBUG: app={app}")
# EOF
|