Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -24,19 +24,18 @@ def freemium_watermark(img, sb_logo):
|
|
24 |
|
25 |
sb_logo = Image.open("./SB_logo_horizontal.png")
|
26 |
|
27 |
-
with gr.Blocks() as demo:
|
28 |
with gr.Row():
|
29 |
with gr.Column():
|
30 |
input = gr.Image(type="pil", label="Upload Image", sources=["upload"])
|
31 |
with gr.Column():
|
32 |
image = gr.Image(label="Sketch Drawing", show_share_button=False)
|
|
|
33 |
examples = gr.Examples(examples=["road_small.jpg", "preview_small.jpg", "trailer.jpg"], inputs=[input])
|
34 |
@gr.on(inputs=[input], outputs=[image], show_progress="minimal")
|
35 |
def sketch(input_path):
|
36 |
if input_path is None:
|
37 |
return None
|
38 |
-
# with Image.open(input_path) as img:
|
39 |
-
# img_array = np.array(img)
|
40 |
img_array = np.array(input_path)
|
41 |
# Line processing
|
42 |
blurred = cv2.GaussianBlur(img_array, (7, 7), 0)
|
|
|
24 |
|
25 |
sb_logo = Image.open("./SB_logo_horizontal.png")
|
26 |
|
27 |
+
with gr.Blocks(analytics_enabled=False) as demo:
|
28 |
with gr.Row():
|
29 |
with gr.Column():
|
30 |
input = gr.Image(type="pil", label="Upload Image", sources=["upload"])
|
31 |
with gr.Column():
|
32 |
image = gr.Image(label="Sketch Drawing", show_share_button=False)
|
33 |
+
gr.Markdown("Want to remove the watermark? Subscribe or [purchase a model](https://skyebrowse.com/pricing) starting at $3.")
|
34 |
examples = gr.Examples(examples=["road_small.jpg", "preview_small.jpg", "trailer.jpg"], inputs=[input])
|
35 |
@gr.on(inputs=[input], outputs=[image], show_progress="minimal")
|
36 |
def sketch(input_path):
|
37 |
if input_path is None:
|
38 |
return None
|
|
|
|
|
39 |
img_array = np.array(input_path)
|
40 |
# Line processing
|
41 |
blurred = cv2.GaussianBlur(img_array, (7, 7), 0)
|