Spaces:
Running
on
Zero
Running
on
Zero
Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -102,7 +102,7 @@ def inference(content_image, style_image, style_strength, progress=gr.Progress(t
|
|
102 |
generated_img = content_img.clone().requires_grad_(True)
|
103 |
optimizer = optim.Adam([generated_img], lr=lr)
|
104 |
|
105 |
-
for _ in tqdm(range(iters), desc=''):
|
106 |
generated_features = model(generated_img)
|
107 |
content_features = model(content_img)
|
108 |
style_features = model(style_img)
|
@@ -129,7 +129,7 @@ def inference(content_image, style_image, style_strength, progress=gr.Progress(t
|
|
129 |
|
130 |
et = time.time()
|
131 |
print('TIME TAKEN:', et-st)
|
132 |
-
yield
|
133 |
|
134 |
|
135 |
examples = [
|
|
|
102 |
generated_img = content_img.clone().requires_grad_(True)
|
103 |
optimizer = optim.Adam([generated_img], lr=lr)
|
104 |
|
105 |
+
for _ in tqdm(range(iters), desc='Creating'):
|
106 |
generated_features = model(generated_img)
|
107 |
content_features = model(content_img)
|
108 |
style_features = model(style_img)
|
|
|
129 |
|
130 |
et = time.time()
|
131 |
print('TIME TAKEN:', et-st)
|
132 |
+
yield save_img(generated_img, original_size)
|
133 |
|
134 |
|
135 |
examples = [
|