Spaces:
Paused
Paused
giorgio-caparvi
commited on
Commit
·
2766386
1
Parent(s):
9a3f7c2
created error message
Browse files- api/app.py +7 -4
api/app.py
CHANGED
@@ -26,7 +26,7 @@ def generate_design():
|
|
26 |
'--dataset_path', '/api/model/assets/data/vitonhd',
|
27 |
'--batch_size', '1',
|
28 |
'--mixed_precision', 'fp16',
|
29 |
-
'--output_dir',
|
30 |
'--save_name', 'generato_paired',
|
31 |
'--num_workers_test', '4',
|
32 |
'--sketch_cond_rate', '0.2',
|
@@ -36,9 +36,12 @@ def generate_design():
|
|
36 |
]
|
37 |
|
38 |
try:
|
39 |
-
subprocess.run(command, check=True)
|
40 |
-
|
41 |
-
|
|
|
|
|
|
|
42 |
# Check if the image was generated
|
43 |
if os.path.exists(image_path):
|
44 |
print("IMMAGINE CREATA")
|
|
|
26 |
'--dataset_path', '/api/model/assets/data/vitonhd',
|
27 |
'--batch_size', '1',
|
28 |
'--mixed_precision', 'fp16',
|
29 |
+
'--output_dir', 'api/output',
|
30 |
'--save_name', 'generato_paired',
|
31 |
'--num_workers_test', '4',
|
32 |
'--sketch_cond_rate', '0.2',
|
|
|
36 |
]
|
37 |
|
38 |
try:
|
39 |
+
result = subprocess.run(command, check=True, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
40 |
+
print(f"Command output: {result.stdout}")
|
41 |
+
print(f"Command errors: {result.stderr}")
|
42 |
+
#image_path = os.path.join(output_dir, image_filename)
|
43 |
+
image_path = "/api/output/generato_paired_paired/images/03191_00.jpg"
|
44 |
+
print("immagine creata")
|
45 |
# Check if the image was generated
|
46 |
if os.path.exists(image_path):
|
47 |
print("IMMAGINE CREATA")
|