Spaces:
Runtime error
Runtime error
import gradio as gr
Browse files12345678891011121314151617import gradio as gr
def echo(text, request: gr.Request): if request: print("Request headers dictionary:", request.headers) print("IP address:", request.client.host) print("Query parameters:", dict(request.query_params)) return textio = gr.Interface(echo, "textbox", "textbox").launch()
with gr.Blocks() as demo: text_1 = demo.text(name="Text 1") text_2 = demo.text(name="Text 2")
demo.load("echo", echo, inputs=text_1, outputs=text_2)
demo.launch()app.py+10-1