Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -82,18 +82,21 @@ def run_script(url: str, height: int, width: int, check_b,check_h):
|
|
| 82 |
except Exception:
|
| 83 |
mes="<center>Some blocks returned an error"
|
| 84 |
if out_box:
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
|
| 88 |
-
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
| 92 |
if check_h:
|
| 93 |
head_paste = get_concat_v_cut(f'head-{uid}-tmp.png',f'comb-{uid}-tmp.png')
|
| 94 |
head_paste.save(f'comb-{uid}-tmp.png')
|
| 95 |
out = f'comb-{uid}-tmp.png'
|
| 96 |
-
|
| 97 |
|
| 98 |
|
| 99 |
|
|
|
|
| 82 |
except Exception:
|
| 83 |
mes="<center>Some blocks returned an error"
|
| 84 |
if out_box:
|
| 85 |
+
if len(out_box)>1:
|
| 86 |
+
im_roll = get_concat_v_cut(f'{out_box[0]}',f'{out_box[1]}')
|
| 87 |
+
im_roll.save(f'comb-{uid}-tmp.png')
|
| 88 |
+
for i in range(1,len(out_box)-2):
|
| 89 |
+
im_roll = get_concat_v_cut(f'comb-{uid}-tmp.png',f'{out_box[i+1]}')
|
| 90 |
+
im_roll.save(f'comb-{uid}-tmp.png')
|
| 91 |
+
out = f'comb-{uid}-tmp.png'
|
| 92 |
+
else:
|
| 93 |
+
out_box[0].save(f'comb-{uid}-tmp.png')
|
| 94 |
+
out = f'comb-{uid}-tmp.png'
|
| 95 |
if check_h:
|
| 96 |
head_paste = get_concat_v_cut(f'head-{uid}-tmp.png',f'comb-{uid}-tmp.png')
|
| 97 |
head_paste.save(f'comb-{uid}-tmp.png')
|
| 98 |
out = f'comb-{uid}-tmp.png'
|
| 99 |
+
|
| 100 |
|
| 101 |
|
| 102 |
|