Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -69,6 +69,15 @@ def main(image_path, b_lora_trained_folder, instance_prompt):
|
|
| 69 |
|
| 70 |
if not is_gpu_associated:
|
| 71 |
raise gr.Error("Please associate a T4 or A10G GPU for this Space")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
|
| 73 |
local_dir = "image_to_train"
|
| 74 |
# Check if the directory exists and create it if necessary
|
|
|
|
| 69 |
|
| 70 |
if not is_gpu_associated:
|
| 71 |
raise gr.Error("Please associate a T4 or A10G GPU for this Space")
|
| 72 |
+
|
| 73 |
+
if image_path == None:
|
| 74 |
+
raise gr.Error("You forgot to specify an image reference")
|
| 75 |
+
|
| 76 |
+
if b_lora_trained_folder == "":
|
| 77 |
+
raise gr.Error("You forgot to specify a name for you model")
|
| 78 |
+
|
| 79 |
+
if instance_prompt == "":
|
| 80 |
+
raise gr.Error("You forgot to specify an instance prompt")
|
| 81 |
|
| 82 |
local_dir = "image_to_train"
|
| 83 |
# Check if the directory exists and create it if necessary
|