Spaces:
Sleeping
Sleeping
fix: move LoginButton to top-level Blocks for OAuth redirect to work
Browse files
app.py
CHANGED
|
@@ -322,6 +322,14 @@ def build_app() -> gr.Blocks:
|
|
| 322 |
|
| 323 |
gr.Markdown(HEADER_MD)
|
| 324 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 325 |
with gr.Row():
|
| 326 |
# ---- Left column: config + exercise ----
|
| 327 |
with gr.Column(scale=1):
|
|
@@ -384,9 +392,6 @@ def build_app() -> gr.Blocks:
|
|
| 384 |
gr.Markdown("---")
|
| 385 |
gr.Markdown("### Submit your solution")
|
| 386 |
|
| 387 |
-
with gr.Row():
|
| 388 |
-
gr.LoginButton()
|
| 389 |
-
|
| 390 |
time_slider = gr.Slider(
|
| 391 |
label="Time spent (minutes)",
|
| 392 |
minimum=1,
|
|
|
|
| 322 |
|
| 323 |
gr.Markdown(HEADER_MD)
|
| 324 |
|
| 325 |
+
# HF OAuth login — must be at top level of Blocks for the redirect to work
|
| 326 |
+
with gr.Row():
|
| 327 |
+
gr.LoginButton(scale=0)
|
| 328 |
+
gr.Markdown(
|
| 329 |
+
"_Sign in with your HuggingFace account so we can credit your contribution._",
|
| 330 |
+
scale=1,
|
| 331 |
+
)
|
| 332 |
+
|
| 333 |
with gr.Row():
|
| 334 |
# ---- Left column: config + exercise ----
|
| 335 |
with gr.Column(scale=1):
|
|
|
|
| 392 |
gr.Markdown("---")
|
| 393 |
gr.Markdown("### Submit your solution")
|
| 394 |
|
|
|
|
|
|
|
|
|
|
| 395 |
time_slider = gr.Slider(
|
| 396 |
label="Time spent (minutes)",
|
| 397 |
minimum=1,
|