imorcillo commited on
Commit
4e30d15
·
verified ·
1 Parent(s): eec60a0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +12 -23
app.py CHANGED
@@ -235,31 +235,20 @@ with demo:
235
  allow_flagging="never",
236
  )
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", elem_classes="popup-box")
260
- ok_button.click(fn=hide_popup, outputs=popup)
261
- gr.HTML('</div></div>')
262
-
263
  demo.load(fn=show_popup, outputs=popup)
264
 
265
  gr.HTML("""
 
235
  allow_flagging="never",
236
  )
237
 
238
+ popup = gr.Column(visible=False, elem_id="popup-column")
239
  with popup:
240
+ gr.Box(elem_id="popup-box")
241
+ with gr.Box(elem_id="popup-inner"):
242
+ gr.Markdown("""
243
+ ### ℹ️ Notice
244
+
245
+ Grabaketak ez dira gordetzen eta automatikoki ezabatzen dira.
246
+ No se guardan las grabaciones y se eliminan automáticamente.
247
  The recordings are not saved and are automatically removed.
248
+ """)
249
+ ok_button = gr.Button("OK")
250
+
251
+ ok_button.click(fn=hide_popup, outputs=popup)
 
 
 
 
 
 
 
 
 
 
 
252
  demo.load(fn=show_popup, outputs=popup)
253
 
254
  gr.HTML("""