imorcillo commited on
Commit
cb49cb3
·
verified ·
1 Parent(s): 85494de

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +27 -10
app.py CHANGED
@@ -272,18 +272,35 @@ with demo:
272
  allow_flagging="never",
273
  )
274
 
275
- popup = gr.Column(visible=False, elem_id="popup-overlay")
276
- with popup:
277
- with gr.Column(elem_id="popup-box"):
278
- gr.Markdown("""
279
- ### ℹ️ Notice
 
 
 
 
 
 
280
 
281
- Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.
282
- No se guardan las grabaciones y se eliminan automáticamente.
283
- The recordings are not saved and are automatically removed.
284
- """)
285
- ok_button = gr.Button("OK", elem_id="popup-button")
286
 
 
 
 
 
 
 
 
 
 
 
 
 
287
 
288
  gr.HTML("""
289
  <div id="orai-info">
 
272
  allow_flagging="never",
273
  )
274
 
275
+ #popup = gr.Column(visible=False, elem_id="popup-overlay")
276
+ gr.HTML("""
277
+ <div id="popup-overlay" style="display: flex;">
278
+ <div id="popup-box">
279
+ <h3>ℹ️ Notice</h3>
280
+ <p>Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.<br>
281
+ No se guardan las grabaciones y se eliminan automáticamente.<br>
282
+ The recordings are not saved and are automatically removed.</p>
283
+ <button id="popup-button">OK</button>
284
+ </div>
285
+ </div>
286
 
287
+ <script>
288
+ window.addEventListener('DOMContentLoaded', function () {
289
+ const popup = document.getElementById("popup-overlay");
290
+ const button = document.getElementById("popup-button");
 
291
 
292
+ if (popup) {
293
+ popup.style.display = "flex";
294
+ }
295
+
296
+ if (button) {
297
+ button.onclick = () => {
298
+ popup.style.display = "none";
299
+ };
300
+ }
301
+ });
302
+ </script>
303
+ """)
304
 
305
  gr.HTML("""
306
  <div id="orai-info">