Spaces:
Runtime error
Runtime error
Commit
Β·
90f49ca
1
Parent(s):
3062ffd
delete not working
Browse files- sharpen_processor.py +20 -19
sharpen_processor.py
CHANGED
@@ -106,19 +106,7 @@ def create_sharpen_tab():
|
|
106 |
with gr.Row():
|
107 |
with gr.Column():
|
108 |
input_image = gr.Image(label="Input Image", height=256)
|
109 |
-
|
110 |
-
with gr.Tabs():
|
111 |
-
with gr.Tab("CAS"):
|
112 |
-
cas_amount = gr.Slider(
|
113 |
-
minimum=0.0,
|
114 |
-
maximum=1.0,
|
115 |
-
value=0.8,
|
116 |
-
step=0.05,
|
117 |
-
label="Amount"
|
118 |
-
)
|
119 |
-
cas_btn = gr.Button("Apply CAS")
|
120 |
-
|
121 |
-
with gr.Tab("Smart Sharpen"):
|
122 |
noise_radius = gr.Slider(
|
123 |
minimum=1,
|
124 |
maximum=25,
|
@@ -148,18 +136,31 @@ def create_sharpen_tab():
|
|
148 |
label="Blend Ratio"
|
149 |
)
|
150 |
smart_btn = gr.Button("Apply Smart Sharpen")
|
151 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
152 |
with gr.Column():
|
153 |
output_image = gr.Image(label="Sharpened Image")
|
154 |
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
cas_btn.click(
|
156 |
fn=apply_cas,
|
157 |
inputs=[input_image, cas_amount],
|
158 |
outputs=output_image
|
159 |
)
|
160 |
|
161 |
-
|
162 |
-
fn=apply_smart_sharpen,
|
163 |
-
inputs=[input_image, noise_radius, preserve_edges, sharpen, ratio],
|
164 |
-
outputs=output_image
|
165 |
-
)
|
|
|
106 |
with gr.Row():
|
107 |
with gr.Column():
|
108 |
input_image = gr.Image(label="Input Image", height=256)
|
109 |
+
with gr.Tab("Smart Sharpen"):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
110 |
noise_radius = gr.Slider(
|
111 |
minimum=1,
|
112 |
maximum=25,
|
|
|
136 |
label="Blend Ratio"
|
137 |
)
|
138 |
smart_btn = gr.Button("Apply Smart Sharpen")
|
139 |
+
|
140 |
+
with gr.Tabs():
|
141 |
+
with gr.Tab("CAS"):
|
142 |
+
cas_amount = gr.Slider(
|
143 |
+
minimum=0.0,
|
144 |
+
maximum=1.0,
|
145 |
+
value=0.8,
|
146 |
+
step=0.05,
|
147 |
+
label="Amount"
|
148 |
+
)
|
149 |
+
cas_btn = gr.Button("Apply CAS")
|
150 |
+
|
151 |
with gr.Column():
|
152 |
output_image = gr.Image(label="Sharpened Image")
|
153 |
|
154 |
+
smart_btn.click(
|
155 |
+
fn=apply_smart_sharpen,
|
156 |
+
inputs=[input_image, noise_radius, preserve_edges, sharpen, ratio],
|
157 |
+
outputs=output_image
|
158 |
+
)
|
159 |
+
|
160 |
cas_btn.click(
|
161 |
fn=apply_cas,
|
162 |
inputs=[input_image, cas_amount],
|
163 |
outputs=output_image
|
164 |
)
|
165 |
|
166 |
+
|
|
|
|
|
|
|
|