BookSumBeta / app.py
npc0's picture
Update app.py
5d8069e
raw
history blame
438 Bytes
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()