jy-raychen commited on
Commit
cc1fe64
1 Parent(s): 2ee1ac9

init with demo code

Browse files
Files changed (1) hide show
  1. app.py +5 -7
app.py CHANGED
@@ -1,10 +1,8 @@
1
  import gradio as gr
2
 
3
- def echo(text, request: gr.Request):
4
- if request:
5
- print("Request headers dictionary:", request.headers)
6
- print("IP address:", request.client.host)
7
- print("Query parameters:", dict(request.query_params))
8
- return str(request.url)
9
 
10
- io = gr.Interface(echo, "textbox", "textbox").launch()
 
 
 
1
  import gradio as gr
2
 
3
+ def greet(name):
4
+ return "Hello " + name
 
 
 
 
5
 
6
+ demo = gr.Interface(fn=greet, inputs="text", outputs="text")
7
+
8
+ demo.launch()