File size: 234 Bytes
66f8fc1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
from fastapi import FastAPI
import gradio as gr


app = FastAPI()


def greet(name):
    return "Hello " + name + "!"


@app.get("/")
def read_root():
    demo = gr.Interface(fn=greet, inputs="text", outputs="text")
    demo.launch()