Spaces:
Sleeping
Sleeping
File size: 438 Bytes
615f98d 4a6693c 5d8069e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
def greet(name):
return "Hello " + name + "!!"
def hello(profile: gr.OAuthProfile | None) -> str:
if profile is None:
return "I don't know you."
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()
return f"Hello {profile.name}"
with gr.Blocks() as demo:
gr.LoginButton()
gr.LogoutButton()
gr.Markdown().attach_load_event(hello, None)
demo.launch() |