Spaces:
Running
on
Zero
Running
on
Zero
added more zerogpu attributes.
Browse files
app.py
CHANGED
|
@@ -452,7 +452,6 @@ def predict(text_input, sample_size_slider, reduce_sample_checkbox, sample_reduc
|
|
| 452 |
gr.Button(visible=False) # Return hidden state for cancel button
|
| 453 |
]
|
| 454 |
|
| 455 |
-
|
| 456 |
predict.zerogpu = True
|
| 457 |
|
| 458 |
|
|
@@ -651,5 +650,13 @@ with gr.Blocks(theme=theme, css="""
|
|
| 651 |
# Mount and run app
|
| 652 |
app = gr.mount_gradio_app(app, demo, path="/",ssr_mode=False)
|
| 653 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 654 |
if __name__ == "__main__":
|
| 655 |
-
|
|
|
|
| 452 |
gr.Button(visible=False) # Return hidden state for cancel button
|
| 453 |
]
|
| 454 |
|
|
|
|
| 455 |
predict.zerogpu = True
|
| 456 |
|
| 457 |
|
|
|
|
| 650 |
# Mount and run app
|
| 651 |
app = gr.mount_gradio_app(app, demo, path="/",ssr_mode=False)
|
| 652 |
|
| 653 |
+
app.zerogpu = True # Add this line
|
| 654 |
+
|
| 655 |
+
|
| 656 |
+
def start_server(app):
|
| 657 |
+
uvicorn.run(app, host="0.0.0.0", port=7860)
|
| 658 |
+
|
| 659 |
+
start_server.zerogpu = True
|
| 660 |
+
|
| 661 |
if __name__ == "__main__":
|
| 662 |
+
start_server(app)
|