Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -102,8 +102,9 @@ def fourier_transform_drawing(input_image, frames, coefficients, img_size, blur_
|
|
| 102 |
w, h = canvas.get_width_height()
|
| 103 |
buf = np.frombuffer(canvas.buffer_rgba(), dtype=np.uint8)
|
| 104 |
image = Image.fromarray(buf.reshape(h, w, 4), 'RGBA').convert('RGB')
|
|
|
|
| 105 |
|
| 106 |
-
|
| 107 |
|
| 108 |
# Generate and yield images for each frame
|
| 109 |
time = np.linspace(0, 1, num=frames)
|
|
|
|
| 102 |
w, h = canvas.get_width_height()
|
| 103 |
buf = np.frombuffer(canvas.buffer_rgba(), dtype=np.uint8)
|
| 104 |
image = Image.fromarray(buf.reshape(h, w, 4), 'RGBA').convert('RGB')
|
| 105 |
+
last_image = image
|
| 106 |
|
| 107 |
+
yield (last_image, None)
|
| 108 |
|
| 109 |
# Generate and yield images for each frame
|
| 110 |
time = np.linspace(0, 1, num=frames)
|