imorcillo commited on
Commit
4a9e7f9
·
verified ·
1 Parent(s): afbff46

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -2
app.py CHANGED
@@ -237,8 +237,25 @@ with demo:
237
 
238
  popup = gr.Column(visible=False)
239
  with popup:
240
- gr.HTML('<div class="popup-overlay"><div class="popup-box">')
241
- gr.Markdown("Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.\nNo se guardan las grabaciones y se eliminan automáticamente.\nThe recordings are not saved and are automatically removed.")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  ok_button = gr.Button("OK")
243
  ok_button.click(fn=hide_popup, outputs=popup)
244
  gr.HTML('</div></div>')
 
237
 
238
  popup = gr.Column(visible=False)
239
  with popup:
240
+ gr.HTML("""
241
+ <div class="popup-overlay">
242
+ <div class="popup-box">
243
+ <h3>ℹ️ Notice</h3>
244
+ <p>
245
+ Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.<br>
246
+ No se guardan las grabaciones y se eliminan automáticamente.<br>
247
+ The recordings are not saved and are automatically removed.
248
+ </p>
249
+ <button id="ok-btn">OK</button>
250
+ </div>
251
+ </div>
252
+ <script>
253
+ document.getElementById("ok-btn").onclick = () => {
254
+ // Trigger Gradio function via hidden button if needed
255
+ document.querySelector('[data-testid="gr-button"]').click();
256
+ }
257
+ </script>
258
+ """)
259
  ok_button = gr.Button("OK")
260
  ok_button.click(fn=hide_popup, outputs=popup)
261
  gr.HTML('</div></div>')