Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -326,7 +326,17 @@ with gr.Blocks(theme=theme, css=css) as app:
|
|
326 |
inputs=[image_input, filter_type],
|
327 |
outputs=image_output
|
328 |
)
|
329 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
330 |
|
331 |
app.launch(share=True)
|
332 |
|
|
|
326 |
inputs=[image_input, filter_type],
|
327 |
outputs=image_output
|
328 |
)
|
329 |
+
with gr.Tab("Image Upscaler"):
|
330 |
+
with gr.Row():
|
331 |
+
with gr.Column():
|
332 |
+
def upscale_image(input_image, radio_input):
|
333 |
+
upscale_factor = radio_input
|
334 |
+
output_image = cv2.resize(input_image, None, fx = upscale_factor, fy = upscale_factor, interpolation = cv2.INTER_CUBIC)
|
335 |
+
return output_image
|
336 |
+
|
337 |
+
radio_input = gr.Radio(label="Upscale Levels", choices=[2, 4, 6, 8, 10], value=2)
|
338 |
+
|
339 |
+
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")
|
340 |
|
341 |
app.launch(share=True)
|
342 |
|