Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -54,11 +54,8 @@ def sketch_interface(image, blur_strength, brightness, contrast):
|
|
54 |
# Ensure the output is a valid image (PIL Image)
|
55 |
output_image = Image.fromarray(sketch)
|
56 |
|
57 |
-
#
|
58 |
-
output_image
|
59 |
-
|
60 |
-
# Return the processed sketch image
|
61 |
-
return output_image, "sketch_output.png"
|
62 |
|
63 |
# Create Gradio interface
|
64 |
interface = gr.Interface(
|
@@ -69,7 +66,7 @@ interface = gr.Interface(
|
|
69 |
gr.Slider(-100, 100, label="Brightness", value=0),
|
70 |
gr.Slider(1, 3, step=0.1, label="Contrast", value=1)
|
71 |
],
|
72 |
-
outputs=[gr.Image(type="pil", label="Sketch Output"),
|
73 |
title="Cartoon to Sketch Converter",
|
74 |
description="Upload an image to convert it into a sketch, adjust the blur strength, brightness, and contrast for different effects."
|
75 |
)
|
|
|
54 |
# Ensure the output is a valid image (PIL Image)
|
55 |
output_image = Image.fromarray(sketch)
|
56 |
|
57 |
+
# Return the processed sketch image for display
|
58 |
+
return output_image
|
|
|
|
|
|
|
59 |
|
60 |
# Create Gradio interface
|
61 |
interface = gr.Interface(
|
|
|
66 |
gr.Slider(-100, 100, label="Brightness", value=0),
|
67 |
gr.Slider(1, 3, step=0.1, label="Contrast", value=1)
|
68 |
],
|
69 |
+
outputs=[gr.Image(type="pil", label="Sketch Output")], # Output is now just the image
|
70 |
title="Cartoon to Sketch Converter",
|
71 |
description="Upload an image to convert it into a sketch, adjust the blur strength, brightness, and contrast for different effects."
|
72 |
)
|