Nuno-Tome commited on
Commit
b62fcf9
·
1 Parent(s): 4bf5a30
Files changed (1) hide show
  1. app.py +11 -0
app.py ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
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 text
9
+
10
+ io = gr.Interface(echo, "textbox", "textbox").launch(share=True)
11
+