File size: 349 Bytes
74315e2
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import gradio as gr

# my_function() = interface
def echo(text, request: gr.Request):
	if request:
		print("Request headers dictionary:", request.headers)
		print("IP address:", request.client.host)
		print("uery parameters:", dict(request.query_params))
	return text

# Create Interface Gradio
io = gr.Interface(echo, "textbox", "textbox").launch()