Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
Update app.py
Browse files
app.py
CHANGED
|
@@ -139,6 +139,11 @@ def get_imgs(base_image_path, style_reference_image_path):
|
|
| 139 |
base_image = preprocess_image(base_image_path)
|
| 140 |
style_reference_image = preprocess_image(style_reference_image_path)
|
| 141 |
combination_image = tf.Variable(preprocess_image(base_image_path))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 142 |
|
| 143 |
iterations = 400
|
| 144 |
for i in range(1, iterations + 1):
|
|
|
|
| 139 |
base_image = preprocess_image(base_image_path)
|
| 140 |
style_reference_image = preprocess_image(style_reference_image_path)
|
| 141 |
combination_image = tf.Variable(preprocess_image(base_image_path))
|
| 142 |
+
|
| 143 |
+
# Dimensions of the generated picture.
|
| 144 |
+
width, height = base_image.size
|
| 145 |
+
img_nrows = 400
|
| 146 |
+
img_ncols = int(width * img_nrows / height)
|
| 147 |
|
| 148 |
iterations = 400
|
| 149 |
for i in range(1, iterations + 1):
|