koutch commited on
Commit
d6cb6d6
·
1 Parent(s): 3074b91

switch to gradio

Browse files
Files changed (1) hide show
  1. app.py +13 -5
app.py CHANGED
@@ -1,7 +1,15 @@
1
- from fastapi import FastAPI
2
 
3
- app = FastAPI()
 
4
 
5
- @app.get("/")
6
- def greet_json():
7
- return {"Hello": "World!"}
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
 
3
+ def greet(input_text):
4
+ return f"Hello, {input_text}!"
5
 
6
+ demo = gr.Interface(
7
+ fn=greet,
8
+ inputs=gr.Textbox(label="Enter text"),
9
+ outputs="text",
10
+ title="Simple Greeting App",
11
+ description="Type something and see the response."
12
+ )
13
+
14
+ if __name__ == "__main__":
15
+ demo.launch()