Thiwanka01's picture
Create app.py
74315e2 verified
raw
history blame contribute delete
349 Bytes
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()