Spaces:
Running
Running
refine
Browse files
app.py
CHANGED
|
@@ -694,7 +694,7 @@ def check_auth_on_load(request: gr.Request):
|
|
| 694 |
gr.update(interactive=True), # feedback
|
| 695 |
gr.update(interactive=True), # submit_feedback_btn
|
| 696 |
gr.update(visible=False), # hint_markdown
|
| 697 |
-
gr.update(visible=
|
| 698 |
gr.update(visible=False), # refresh_auth_button (hide when authenticated)
|
| 699 |
token, # oauth_token
|
| 700 |
)
|
|
@@ -1185,6 +1185,7 @@ with gr.Blocks(js=clickable_links_js) as app:
|
|
| 1185 |
gr.update(interactive=True), # Enable feedback radio buttons
|
| 1186 |
gr.update(interactive=True), # Enable submit_feedback_btn
|
| 1187 |
gr.update(visible=False), # Hide the hint string
|
|
|
|
| 1188 |
gr.update(visible=False), # Hide refresh button when authenticated
|
| 1189 |
token, # Store the oauth token
|
| 1190 |
)
|
|
@@ -1197,6 +1198,7 @@ with gr.Blocks(js=clickable_links_js) as app:
|
|
| 1197 |
gr.update(interactive=False), # Keep feedback radio buttons disabled
|
| 1198 |
gr.update(interactive=False), # Keep submit_feedback_btn disabled
|
| 1199 |
gr.update(visible=True, value="## Please sign in with Hugging Face!\nClick the 'Sign in with Hugging Face' button above, then click 'Refresh Login Status' after you return from the auth page."), # Show instructions
|
|
|
|
| 1200 |
gr.update(visible=True), # Show refresh button
|
| 1201 |
None, # Clear oauth_token
|
| 1202 |
)
|
|
@@ -1213,6 +1215,7 @@ with gr.Blocks(js=clickable_links_js) as app:
|
|
| 1213 |
feedback, # Enable feedback radio buttons
|
| 1214 |
submit_feedback_btn, # Enable submit_feedback_btn
|
| 1215 |
hint_markdown, # Hide the hint string
|
|
|
|
| 1216 |
refresh_auth_button, # Control refresh button visibility
|
| 1217 |
oauth_token, # Store the OAuth token
|
| 1218 |
],
|
|
|
|
| 694 |
gr.update(interactive=True), # feedback
|
| 695 |
gr.update(interactive=True), # submit_feedback_btn
|
| 696 |
gr.update(visible=False), # hint_markdown
|
| 697 |
+
gr.update(visible=True), # login_button (keep visible for logout)
|
| 698 |
gr.update(visible=False), # refresh_auth_button (hide when authenticated)
|
| 699 |
token, # oauth_token
|
| 700 |
)
|
|
|
|
| 1185 |
gr.update(interactive=True), # Enable feedback radio buttons
|
| 1186 |
gr.update(interactive=True), # Enable submit_feedback_btn
|
| 1187 |
gr.update(visible=False), # Hide the hint string
|
| 1188 |
+
gr.update(visible=True), # Keep login button visible for logout
|
| 1189 |
gr.update(visible=False), # Hide refresh button when authenticated
|
| 1190 |
token, # Store the oauth token
|
| 1191 |
)
|
|
|
|
| 1198 |
gr.update(interactive=False), # Keep feedback radio buttons disabled
|
| 1199 |
gr.update(interactive=False), # Keep submit_feedback_btn disabled
|
| 1200 |
gr.update(visible=True, value="## Please sign in with Hugging Face!\nClick the 'Sign in with Hugging Face' button above, then click 'Refresh Login Status' after you return from the auth page."), # Show instructions
|
| 1201 |
+
gr.update(visible=True), # Keep login button visible
|
| 1202 |
gr.update(visible=True), # Show refresh button
|
| 1203 |
None, # Clear oauth_token
|
| 1204 |
)
|
|
|
|
| 1215 |
feedback, # Enable feedback radio buttons
|
| 1216 |
submit_feedback_btn, # Enable submit_feedback_btn
|
| 1217 |
hint_markdown, # Hide the hint string
|
| 1218 |
+
login_button, # Control login button visibility
|
| 1219 |
refresh_auth_button, # Control refresh button visibility
|
| 1220 |
oauth_token, # Store the OAuth token
|
| 1221 |
],
|