Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -132,7 +132,7 @@ def preprocess_image(image, std_dev=0.1, downscale_factor=4, target_size=(256, 2
|
|
132 |
resized_img = resized_img.astype(np.float32) / 255.0
|
133 |
|
134 |
# Agregar ruido gaussiano
|
135 |
-
noise = np.random.normal(
|
136 |
noisy_img = resized_img + noise
|
137 |
noisy_img = np.clip(noisy_img, 0, 1)
|
138 |
|
|
|
132 |
resized_img = resized_img.astype(np.float32) / 255.0
|
133 |
|
134 |
# Agregar ruido gaussiano
|
135 |
+
noise = np.random.normal(1, std_dev, resized_img.shape)
|
136 |
noisy_img = resized_img + noise
|
137 |
noisy_img = np.clip(noisy_img, 0, 1)
|
138 |
|