Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import gradio as gr
|
2 |
+
|
3 |
+
def echo(name, request: gr.Request):
|
4 |
+
if request:
|
5 |
+
print("Request headers dictionary:", request.headers)
|
6 |
+
print("IP address:", request.client.host)
|
7 |
+
return name
|
8 |
+
|
9 |
+
io = gr.Interface(echo, "textbox", "textbox").launch()
|