File size: 411 Bytes
9649d56
 
 
 
 
 
5ce0be8
9649d56
c7964dd
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
import gradio as gr

def echo(name, request: gr.Request):
    if request:
        print("Request headers dictionary:", request.headers)
        print("IP address:", request.client.host)
    return str(request.headers), str(request.client.host)

def verify_auth(username, password, request: gr.Request):
    return False
    

io = gr.Interface(echo, "textbox", ["textbox", "textbox"], auth=verify_auth).launch()