lanbogao commited on
Commit
1f9b118
1 Parent(s): 03696c9

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from fastapi import FastAPI
2
+ import gradio as gr
3
+
4
+ CUSTOM_PATH = "/gradio"
5
+
6
+ app = FastAPI()
7
+
8
+
9
+ @app.get("/")
10
+ def read_main():
11
+ return {"message": "This is your main app"}
12
+
13
+
14
+ io = gr.Interface(lambda x: "Hello, " + x + "!", "textbox", "textbox")
15
+ app = gr.mount_gradio_app(app, io, path=CUSTOM_PATH)