Spaces:
Sleeping
Sleeping
File size: 619 Bytes
615f98d 16f1aaf 615f98d cb8de88 98947d1 cb8de88 615f98d 16f1aaf 98947d1 16f1aaf 9f6262d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
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 '
'<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() |