Miquel Farré
commited on
Commit
·
ffaa42f
1
Parent(s):
942117f
update
Browse files
app.py
CHANGED
|
@@ -112,20 +112,25 @@ def join_waitlist(
|
|
| 112 |
visible=True
|
| 113 |
)
|
| 114 |
|
| 115 |
-
def update_ui(profile: gr.OAuthProfile | None) -> Tuple[
|
| 116 |
"""Update UI elements based on login status"""
|
| 117 |
if profile is None:
|
| 118 |
return (
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
|
|
|
|
|
|
|
|
|
| 122 |
)
|
| 123 |
return (
|
| 124 |
-
|
| 125 |
-
|
| 126 |
-
|
|
|
|
|
|
|
|
|
|
| 127 |
)
|
| 128 |
-
|
| 129 |
# Create the interface
|
| 130 |
with gr.Blocks(title="SmolVLM2 Waitlist") as demo:
|
| 131 |
gr.Markdown("""
|
|
|
|
| 112 |
visible=True
|
| 113 |
)
|
| 114 |
|
| 115 |
+
def update_ui(profile: gr.OAuthProfile | None) -> Tuple[gr.update, gr.update, gr.update]:
|
| 116 |
"""Update UI elements based on login status"""
|
| 117 |
if profile is None:
|
| 118 |
return (
|
| 119 |
+
gr.update(
|
| 120 |
+
value="## Please sign in with your Hugging Face account to join the waitlist.",
|
| 121 |
+
visible=True
|
| 122 |
+
),
|
| 123 |
+
gr.update(visible=False),
|
| 124 |
+
gr.update(visible=False)
|
| 125 |
)
|
| 126 |
return (
|
| 127 |
+
gr.update(
|
| 128 |
+
value=f"## Welcome {profile.name} 👋 Click the button below 👇 to receive any updates related with the SmolVLM2 iPhone application",
|
| 129 |
+
visible=True
|
| 130 |
+
),
|
| 131 |
+
gr.update(visible=True),
|
| 132 |
+
gr.update(visible=True)
|
| 133 |
)
|
|
|
|
| 134 |
# Create the interface
|
| 135 |
with gr.Blocks(title="SmolVLM2 Waitlist") as demo:
|
| 136 |
gr.Markdown("""
|