Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
lixiang46
commited on
Commit
•
0805db6
1
Parent(s):
dbe8337
update
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ import json
|
|
11 |
|
12 |
def start_tryon(person_img, garment_img, seed, randomize_seed):
|
13 |
if person_img is None or garment_img is None:
|
14 |
-
return None, None,
|
15 |
if randomize_seed:
|
16 |
seed = random.randint(0, MAX_SEED)
|
17 |
encoded_person_img = cv2.imencode('.jpg', cv2.cvtColor(person_img, cv2.COLOR_RGB2BGR))[1].tobytes()
|
|
|
11 |
|
12 |
def start_tryon(person_img, garment_img, seed, randomize_seed):
|
13 |
if person_img is None or garment_img is None:
|
14 |
+
return None, None, "Empty image"
|
15 |
if randomize_seed:
|
16 |
seed = random.randint(0, MAX_SEED)
|
17 |
encoded_person_img = cv2.imencode('.jpg', cv2.cvtColor(person_img, cv2.COLOR_RGB2BGR))[1].tobytes()
|