File size: 297 Bytes
b2bd06d
 
 
 
 
 
 
 
7cb30e5
b2bd06d
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import gradio as gr

def test(x, profile: gr.OAuthProfile | None):
    if profile is None:
        return "I don't know you."
    return f"{x} {profile.name}"

with gr.Blocks() as demo:
    l = gr.LoginButton()
    t1 = gr.Textbox()
    t2 = gr.Textbox()
    t1.submit(test, t1, t2)

demo.launch()