Spaces:
Runtime error
Runtime error
Riddhi Bhagwat
commited on
Commit
·
4b0859f
1
Parent(s):
27df61b
bug fixes
Browse files- .DS_Store +0 -0
- app/app.py +16 -3
.DS_Store
CHANGED
|
Binary files a/.DS_Store and b/.DS_Store differ
|
|
|
app/app.py
CHANGED
|
@@ -1294,10 +1294,23 @@ with gr.Blocks(css=css, js=js) as demo:
|
|
| 1294 |
)
|
| 1295 |
|
| 1296 |
# Update the consent button click handler
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1297 |
consent_btn.click(
|
| 1298 |
-
fn=
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1299 |
inputs=[],
|
| 1300 |
-
outputs=[
|
|
|
|
| 1301 |
)
|
| 1302 |
|
| 1303 |
##############################
|
|
@@ -1325,7 +1338,7 @@ with gr.Blocks(css=css, js=js) as demo:
|
|
| 1325 |
inputs=[dataframe, conversation_id, session_id, language],
|
| 1326 |
outputs=[dataframe, chatbot, leaderboard_data]
|
| 1327 |
).then(
|
| 1328 |
-
|
| 1329 |
inputs=[leaderboard_data],
|
| 1330 |
outputs=[leaderboard_html]
|
| 1331 |
)
|
|
|
|
| 1294 |
)
|
| 1295 |
|
| 1296 |
# Update the consent button click handler
|
| 1297 |
+
def accept_consent():
|
| 1298 |
+
"""Handle user accepting the consent agreement"""
|
| 1299 |
+
return True
|
| 1300 |
+
|
| 1301 |
consent_btn.click(
|
| 1302 |
+
fn=accept_consent,
|
| 1303 |
+
inputs=[],
|
| 1304 |
+
outputs=[user_consented]
|
| 1305 |
+
).then(
|
| 1306 |
+
fn=update_visibility,
|
| 1307 |
+
inputs=[user_consented],
|
| 1308 |
+
outputs=[main_app, consent_overlay, consent_modal, footer_banner, footer_section]
|
| 1309 |
+
).then(
|
| 1310 |
+
fn=lambda: "true",
|
| 1311 |
inputs=[],
|
| 1312 |
+
outputs=[],
|
| 1313 |
+
_js="(val) => window.set_cookie('feel_consent', 'true')"
|
| 1314 |
)
|
| 1315 |
|
| 1316 |
##############################
|
|
|
|
| 1338 |
inputs=[dataframe, conversation_id, session_id, language],
|
| 1339 |
outputs=[dataframe, chatbot, leaderboard_data]
|
| 1340 |
).then(
|
| 1341 |
+
render_leaderboard,
|
| 1342 |
inputs=[leaderboard_data],
|
| 1343 |
outputs=[leaderboard_html]
|
| 1344 |
)
|