BookSumBeta / app.py
npc0's picture
Update app.py
6d7c8c6
raw
history blame
613 Bytes
import gradio as gr
def greet(name):
return "Hello " + name + "!!"
def hello(profile = gr.OAuthProfile):
if profile is None:
return gr.Markdown(
'# ePub summarization tool '
'<p style="text-align: center;">Login to access the tool.</p>'
)
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()