Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -273,39 +273,22 @@ with demo:
|
|
273 |
)
|
274 |
|
275 |
###############################
|
276 |
-
#
|
277 |
-
gr.
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
window.addEventListener('DOMContentLoaded', function () {
|
293 |
-
const popup = document.getElementById("popup-overlay");
|
294 |
-
const button = document.getElementById("popup-button");
|
295 |
-
|
296 |
-
if (popup) {
|
297 |
-
popup.style.display = "flex"; // Show popup explicitly
|
298 |
-
}
|
299 |
-
|
300 |
-
if (button) {
|
301 |
-
button.onclick = () => {
|
302 |
-
popup.style.display = "none"; // Hide popup on button click
|
303 |
-
};
|
304 |
-
}
|
305 |
-
});
|
306 |
-
</script>
|
307 |
-
""")
|
308 |
-
demo.load(fn=show_popup, outputs=popup)
|
309 |
###################
|
310 |
|
311 |
gr.HTML("""
|
|
|
273 |
)
|
274 |
|
275 |
###############################
|
276 |
+
# Modal component
|
277 |
+
popup_modal = gr.Column(visible=False, elem_id="popup-overlay")
|
278 |
+
with popup_modal:
|
279 |
+
gr.Markdown(
|
280 |
+
"""
|
281 |
+
### ℹ️ Notice
|
282 |
+
|
283 |
+
Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.
|
284 |
+
No se guardan las grabaciones y se eliminan automáticamente.
|
285 |
+
The recordings are not saved and are automatically removed.
|
286 |
+
""",
|
287 |
+
elem_id="popup-box"
|
288 |
+
)
|
289 |
+
ok_btn = gr.Button("OK", elem_id="popup-button")
|
290 |
+
ok_btn.click(fn=hide_popup, outputs=popup_modal)
|
291 |
+
demo.load(fn=show_popup, outputs=popup_modal)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
292 |
###################
|
293 |
|
294 |
gr.HTML("""
|