Spaces:
Runtime error
Runtime error
Commit
•
148af15
1
Parent(s):
214d6ac
Update app.py
Browse files
app.py
CHANGED
@@ -442,16 +442,16 @@ with gr.Blocks(css=css) as demo:
|
|
442 |
train_btn.click(lambda:gr.update(visible=True), inputs=None, outputs=training_ongoing)
|
443 |
|
444 |
#The main train function
|
445 |
-
train_btn.click(fn=train, inputs=is_visible+concept_collection+file_collection+[training_summary_model_name]+[training_summary_checkbox]+[training_summary_token]+[type_of_thing]+[steps]+[perc_txt_encoder]+[swap_auto_calculated], outputs=[result, try_your_model, push_to_hub, convert_button, training_ongoing, completed_training])
|
446 |
|
447 |
#Button to generate an image from your trained model after training
|
448 |
-
generate_button.click(fn=generate, inputs=prompt, outputs=result_image)
|
449 |
#Button to push the model to the Hugging Face Hub
|
450 |
-
push_button.click(fn=push, inputs=[model_name, where_to_upload, hf_token], outputs=[success_message_upload, result])
|
451 |
#Button to convert the model to ckpt format
|
452 |
-
convert_button.click(fn=convert_to_ckpt, inputs=[], outputs=result)
|
453 |
|
454 |
#Checks if the training is running
|
455 |
demo.load(fn=check_status, inputs=top_description, outputs=[top_description, try_your_model, push_to_hub, result, convert_button], queue=False)
|
456 |
|
457 |
-
demo.launch(debug=True)
|
|
|
442 |
train_btn.click(lambda:gr.update(visible=True), inputs=None, outputs=training_ongoing)
|
443 |
|
444 |
#The main train function
|
445 |
+
train_btn.click(fn=train, inputs=is_visible+concept_collection+file_collection+[training_summary_model_name]+[training_summary_checkbox]+[training_summary_token]+[type_of_thing]+[steps]+[perc_txt_encoder]+[swap_auto_calculated], outputs=[result, try_your_model, push_to_hub, convert_button, training_ongoing, completed_training], queue=True)
|
446 |
|
447 |
#Button to generate an image from your trained model after training
|
448 |
+
generate_button.click(fn=generate, inputs=prompt, outputs=result_image, queue=True)
|
449 |
#Button to push the model to the Hugging Face Hub
|
450 |
+
push_button.click(fn=push, inputs=[model_name, where_to_upload, hf_token], outputs=[success_message_upload, result], queue=True)
|
451 |
#Button to convert the model to ckpt format
|
452 |
+
convert_button.click(fn=convert_to_ckpt, inputs=[], outputs=result, queue=True)
|
453 |
|
454 |
#Checks if the training is running
|
455 |
demo.load(fn=check_status, inputs=top_description, outputs=[top_description, try_your_model, push_to_hub, result, convert_button], queue=False)
|
456 |
|
457 |
+
demo.queue(default_enabled=False).launch(debug=True)
|