Spaces:
Sleeping
Sleeping
added zero-gpu to more functions
Browse files
app.py
CHANGED
|
@@ -453,6 +453,9 @@ def predict(text_input, sample_size_slider, reduce_sample_checkbox, sample_reduc
|
|
| 453 |
]
|
| 454 |
|
| 455 |
|
|
|
|
|
|
|
|
|
|
| 456 |
|
| 457 |
theme = gr.themes.Monochrome(
|
| 458 |
font=[gr.themes.GoogleFont("Roboto Condensed"), "ui-sans-serif", "system-ui", "sans-serif"],
|
|
@@ -616,6 +619,10 @@ with gr.Blocks(theme=theme, css="""
|
|
| 616 |
|
| 617 |
def hide_cancel_button():
|
| 618 |
return gr.Button(visible=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 619 |
|
| 620 |
# Update the run button click event
|
| 621 |
run_event = run_btn.click(
|
|
@@ -640,7 +647,6 @@ with gr.Blocks(theme=theme, css="""
|
|
| 640 |
)
|
| 641 |
|
| 642 |
|
| 643 |
-
predict.zerogpu = True
|
| 644 |
|
| 645 |
# Mount and run app
|
| 646 |
app = gr.mount_gradio_app(app, demo, path="/",ssr_mode=False)
|
|
|
|
| 453 |
]
|
| 454 |
|
| 455 |
|
| 456 |
+
predict.zerogpu = True
|
| 457 |
+
|
| 458 |
+
|
| 459 |
|
| 460 |
theme = gr.themes.Monochrome(
|
| 461 |
font=[gr.themes.GoogleFont("Roboto Condensed"), "ui-sans-serif", "system-ui", "sans-serif"],
|
|
|
|
| 619 |
|
| 620 |
def hide_cancel_button():
|
| 621 |
return gr.Button(visible=False)
|
| 622 |
+
|
| 623 |
+
show_cancel_button.zerogpu = True
|
| 624 |
+
hide_cancel_button.zerogpu = True
|
| 625 |
+
predict.zerogpu = True
|
| 626 |
|
| 627 |
# Update the run button click event
|
| 628 |
run_event = run_btn.click(
|
|
|
|
| 647 |
)
|
| 648 |
|
| 649 |
|
|
|
|
| 650 |
|
| 651 |
# Mount and run app
|
| 652 |
app = gr.mount_gradio_app(app, demo, path="/",ssr_mode=False)
|