Spaces:
Runtime error
Runtime error
Fabrice-TIERCELIN
commited on
Commit
•
20b47ed
1
Parent(s):
4f5118b
Bracket
Browse files
app.py
CHANGED
@@ -81,7 +81,7 @@ def predict(source_img, enlarge_top, enlarge_right, enlarge_bottom, enlarge_left
|
|
81 |
for i in range(output_width):
|
82 |
for j in range(output_height):
|
83 |
enlarged_pixel = enlarged_pixels[i, j]
|
84 |
-
noise = max(min(abs(enlarge_left - i), abs(enlarge_top + original_width - i)
|
85 |
noise_image.putpixel((i, j), (noise_color(enlarged_pixel[0], noise), noise_color(enlarged_pixel[1], noise), noise_color(enlarged_pixel[2], noise), 255))
|
86 |
|
87 |
enlarged_image.paste(noise_image, (0, 0))
|
|
|
81 |
for i in range(output_width):
|
82 |
for j in range(output_height):
|
83 |
enlarged_pixel = enlarged_pixels[i, j]
|
84 |
+
noise = max(min(abs(enlarge_left - i), abs(enlarge_top + original_width - i), abs(enlarge_top - j), abs(enlarge_top + original_height - j), 255)
|
85 |
noise_image.putpixel((i, j), (noise_color(enlarged_pixel[0], noise), noise_color(enlarged_pixel[1], noise), noise_color(enlarged_pixel[2], noise), 255))
|
86 |
|
87 |
enlarged_image.paste(noise_image, (0, 0))
|