import gradio as gr def greet(name): return "Hello " + name + "!!" def hello(profile: gr.OAuthProfile | None): if profile is None: return gr.Markdown( '# ePub summarization tool ' '
Login to access the tool.
' ) with gr.Blocks() as iface: gr.Markdown(f"Hello {profile.name}") gr.Interface(fn=greet, inputs="text", outputs="text") return iface with gr.Blocks() as demo: hello() with gr.Row(): gr.LoginButton() if gr.OAuthProfile is not None: gr.LogoutButton() demo.launch()