Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
from fastapi import FastAPI
|
3 |
+
|
4 |
+
app = FastAPI()
|
5 |
+
|
6 |
+
@app.post("/chatbot/{keyword}")
|
7 |
+
async def video(keyword):
|
8 |
+
name = keyword.lower()
|
9 |
+
return name
|
10 |
+
|
11 |
+
def greet(name):
|
12 |
+
return "Hello " + name + "!!"
|
13 |
+
|
14 |
+
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
15 |
+
iface.launch()
|