gr-login-test / app.py
abidlabs's picture
abidlabs HF Staff
Update app.py
7cb30e5 verified
raw
history blame contribute delete
297 Bytes
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()