Spaces:
Runtime error
Runtime error
Update app.py
Browse filesedited gaussian_blur docstring. possible fix#1
app.py
CHANGED
|
@@ -13,18 +13,14 @@ from Gradio_UI import GradioUI
|
|
| 13 |
def gaussian_blur(image_path: str, output_path: str, kernel_size: int, sigma: int) -> str:
|
| 14 |
"""
|
| 15 |
Applies Gaussian blur to an image and saves the output.
|
| 16 |
-
|
| 17 |
This function reads an image, applies a Gaussian blur with the given
|
| 18 |
kernel size and sigma, and saves the processed image to the output path.
|
| 19 |
|
| 20 |
Args:
|
| 21 |
-
image_path
|
| 22 |
-
output_path
|
| 23 |
-
kernel_size
|
| 24 |
-
sigma
|
| 25 |
-
|
| 26 |
-
Returns:
|
| 27 |
-
str: The path to the saved blurred image.
|
| 28 |
"""
|
| 29 |
image = cv2.imread(image_path)
|
| 30 |
if image is None:
|
|
|
|
| 13 |
def gaussian_blur(image_path: str, output_path: str, kernel_size: int, sigma: int) -> str:
|
| 14 |
"""
|
| 15 |
Applies Gaussian blur to an image and saves the output.
|
|
|
|
| 16 |
This function reads an image, applies a Gaussian blur with the given
|
| 17 |
kernel size and sigma, and saves the processed image to the output path.
|
| 18 |
|
| 19 |
Args:
|
| 20 |
+
image_path: The file path of the input image.
|
| 21 |
+
output_path: The file path where the blurred image will be saved.
|
| 22 |
+
kernel_size: The size of the Gaussian blur kernel (must be an odd number).
|
| 23 |
+
sigma: The standard deviation for the Gaussian kernel.
|
|
|
|
|
|
|
|
|
|
| 24 |
"""
|
| 25 |
image = cv2.imread(image_path)
|
| 26 |
if image is None:
|