Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -332,7 +332,7 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
332 |
submit_button = gr.Button("✨ Apply Filter", variant="primary")
|
333 |
|
334 |
with gr.Column():
|
335 |
-
image_output = gr.Image(label="🖼️ Filtered Image")
|
336 |
|
337 |
submit_button.click(
|
338 |
image_processing,
|
@@ -345,12 +345,12 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
345 |
with gr.Column():
|
346 |
def upscale_image(input_image, radio_input):
|
347 |
upscale_factor = radio_input
|
348 |
-
output_image = cv2.resize(input_image, None,
|
349 |
return output_image
|
350 |
|
351 |
radio_input = gr.Radio(label="Upscale Levels", choices=[2, 4, 6, 8, 10], value=2)
|
352 |
|
353 |
-
iface = gr.Interface(fn=upscale_image, inputs = [gr.Image(label="Input Image", interactive=True), radio_input], outputs = gr.Image(label="Upscaled Image"), title="Image Upscaler")
|
354 |
|
355 |
|
356 |
app.launch(share=True)
|
|
|
332 |
submit_button = gr.Button("✨ Apply Filter", variant="primary")
|
333 |
|
334 |
with gr.Column():
|
335 |
+
image_output = gr.Image(label="🖼️ Filtered Image", format="png")
|
336 |
|
337 |
submit_button.click(
|
338 |
image_processing,
|
|
|
345 |
with gr.Column():
|
346 |
def upscale_image(input_image, radio_input):
|
347 |
upscale_factor = radio_input
|
348 |
+
output_image = cv2.resize(input_image, None, fx = upscale_factor, fy = upscale_factor, interpolation = cv2.INTER_CUBIC)
|
349 |
return output_image
|
350 |
|
351 |
radio_input = gr.Radio(label="Upscale Levels", choices=[2, 4, 6, 8, 10], value=2)
|
352 |
|
353 |
+
iface = gr.Interface(fn=upscale_image, inputs = [gr.Image(label="Input Image", interactive=True), radio_input], outputs = gr.Image(label="Upscaled Image"), format="png", title="Image Upscaler")
|
354 |
|
355 |
|
356 |
app.launch(share=True)
|