Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -4,22 +4,20 @@ def greet(name):
|
|
| 4 |
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
|
| 7 |
-
def hello(profile
|
| 8 |
if profile is None:
|
| 9 |
return gr.Markdown(
|
| 10 |
'# ePub summarization tool '
|
| 11 |
'<p style="text-align: center;">Login to access the tool.</p>'
|
| 12 |
)
|
| 13 |
-
|
| 14 |
-
gr.Markdown(f"Hello {profile.name}")
|
| 15 |
-
gr.Interface(fn=greet, inputs="text", outputs="text")
|
| 16 |
-
return iface
|
| 17 |
|
| 18 |
|
| 19 |
with gr.Blocks() as demo:
|
| 20 |
-
hello()
|
| 21 |
with gr.Row():
|
| 22 |
gr.LoginButton()
|
| 23 |
-
|
| 24 |
-
|
|
|
|
|
|
|
| 25 |
demo.launch()
|
|
|
|
| 4 |
return "Hello " + name + "!!"
|
| 5 |
|
| 6 |
|
| 7 |
+
def hello(profile: gr.OAuthProfile | None):
|
| 8 |
if profile is None:
|
| 9 |
return gr.Markdown(
|
| 10 |
'# ePub summarization tool '
|
| 11 |
'<p style="text-align: center;">Login to access the tool.</p>'
|
| 12 |
)
|
| 13 |
+
return f"Hello {profile.name}"
|
|
|
|
|
|
|
|
|
|
| 14 |
|
| 15 |
|
| 16 |
with gr.Blocks() as demo:
|
|
|
|
| 17 |
with gr.Row():
|
| 18 |
gr.LoginButton()
|
| 19 |
+
gr.LogoutButton()
|
| 20 |
+
gr.File()
|
| 21 |
+
gr.Markdown().attach_load_event(hello, None)
|
| 22 |
+
|
| 23 |
demo.launch()
|