Spaces:
Runtime error
Runtime error
Xu Ma
commited on
Commit
•
455b3a2
1
Parent(s):
b3db8dd
update
Browse files
app.py
CHANGED
@@ -113,7 +113,7 @@ def run_live(img, experiment_id, cfg_arg=cfg_arg):
|
|
113 |
cfg_arg.target = img
|
114 |
cfg_arg.experiment = experiment
|
115 |
img, text = main_func(img, experiment_id, cfg_arg=cfg_arg)
|
116 |
-
return temp_image,
|
117 |
|
118 |
|
119 |
|
|
|
113 |
cfg_arg.target = img
|
114 |
cfg_arg.experiment = experiment
|
115 |
img, text = main_func(img, experiment_id, cfg_arg=cfg_arg)
|
116 |
+
return temp_image, text
|
117 |
|
118 |
|
119 |
|
main.py
CHANGED
@@ -520,9 +520,9 @@ def main_func(target, experiment, cfg_arg):
|
|
520 |
pydiffvg.imwrite(imshow, filename, gamma=gamma)
|
521 |
|
522 |
### added for app
|
523 |
-
if int(t)%
|
524 |
print(f"debug: {t}, {filename} {img.size()}")
|
525 |
-
return img.detach().cpu().numpy(),
|
526 |
|
527 |
x = img.unsqueeze(0).permute(0, 3, 1, 2) # HWC -> NCHW
|
528 |
|
|
|
520 |
pydiffvg.imwrite(imshow, filename, gamma=gamma)
|
521 |
|
522 |
### added for app
|
523 |
+
if int(t)%30==0:
|
524 |
print(f"debug: {t}, {filename} {img.size()}")
|
525 |
+
return img.detach().cpu().numpy(), int(t)
|
526 |
|
527 |
x = img.unsqueeze(0).permute(0, 3, 1, 2) # HWC -> NCHW
|
528 |
|