Spaces:
Runtime error
Runtime error
Riddhi Bhagwat
commited on
Commit
·
259b6f1
1
Parent(s):
4b0859f
bug fixes + merge
Browse files- app/app.py +5 -14
app/app.py
CHANGED
|
@@ -1293,24 +1293,15 @@ with gr.Blocks(css=css, js=js) as demo:
|
|
| 1293 |
outputs=[main_app, consent_overlay, consent_modal, footer_banner, footer_section]
|
| 1294 |
)
|
| 1295 |
|
| 1296 |
-
|
| 1297 |
-
def accept_consent():
|
| 1298 |
-
"""Handle user accepting the consent agreement"""
|
| 1299 |
-
return True
|
| 1300 |
-
|
| 1301 |
consent_btn.click(
|
| 1302 |
-
fn=
|
| 1303 |
-
|
| 1304 |
-
|
| 1305 |
).then(
|
| 1306 |
fn=update_visibility,
|
| 1307 |
-
inputs=
|
| 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 |
##############################
|
|
|
|
| 1293 |
outputs=[main_app, consent_overlay, consent_modal, footer_banner, footer_section]
|
| 1294 |
)
|
| 1295 |
|
| 1296 |
+
# Update the consent button click handler
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1297 |
consent_btn.click(
|
| 1298 |
+
fn=lambda: True,
|
| 1299 |
+
outputs=user_consented,
|
| 1300 |
+
js="() => set_cookie('feel_consent', 'true')"
|
| 1301 |
).then(
|
| 1302 |
fn=update_visibility,
|
| 1303 |
+
inputs=user_consented,
|
| 1304 |
outputs=[main_app, consent_overlay, consent_modal, footer_banner, footer_section]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1305 |
)
|
| 1306 |
|
| 1307 |
##############################
|