Thiwanka01 commited on
Commit
74315e2
·
verified ·
1 Parent(s): 59b2048

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import gradio as gr
2
+
3
+ # my_function() = interface
4
+ def echo(text, request: gr.Request):
5
+ if request:
6
+ print("Request headers dictionary:", request.headers)
7
+ print("IP address:", request.client.host)
8
+ print("uery parameters:", dict(request.query_params))
9
+ return text
10
+
11
+ # Create Interface Gradio
12
+ io = gr.Interface(echo, "textbox", "textbox").launch()