Spaces:
Runtime error
Runtime error
Create app.py
Browse files
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()
|