Update app.py
Browse files
app.py
CHANGED
@@ -506,6 +506,28 @@ with gr.Blocks() as demo:
|
|
506 |
column_widths=["10%", "30%", "30%", "30%"] # Adjust column widths for better display
|
507 |
)
|
508 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
509 |
run_button.click(
|
510 |
fn=run_and_submit_all,
|
511 |
outputs=[status_output, results_table]
|
|
|
506 |
column_widths=["10%", "30%", "30%", "30%"] # Adjust column widths for better display
|
507 |
)
|
508 |
|
509 |
+
# Add JavaScript for auto-clicking
|
510 |
+
demo.load(None, None, None, _js="""
|
511 |
+
function() {
|
512 |
+
// Initial delay of 30 seconds
|
513 |
+
setTimeout(function() {
|
514 |
+
// Function to click the button
|
515 |
+
function clickButton() {
|
516 |
+
const buttons = document.getElementsByClassName('fa fa-angle-right');
|
517 |
+
if (buttons.length > 0) {
|
518 |
+
buttons[0].click();
|
519 |
+
}
|
520 |
+
}
|
521 |
+
|
522 |
+
// Click immediately after initial delay
|
523 |
+
clickButton();
|
524 |
+
|
525 |
+
// Then click every 5 seconds
|
526 |
+
setInterval(clickButton, 5000);
|
527 |
+
}, 30000);
|
528 |
+
}
|
529 |
+
""")
|
530 |
+
|
531 |
run_button.click(
|
532 |
fn=run_and_submit_all,
|
533 |
outputs=[status_output, results_table]
|