DigiP-AI commited on
Commit
fff338b
·
verified ·
1 Parent(s): b98b9d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -1
app.py CHANGED
@@ -340,5 +340,17 @@ with gr.Blocks(theme=theme, css=css) as app:
340
  outputs=image_output
341
  )
342
 
343
-
 
 
 
 
 
 
 
 
 
 
 
 
344
  app.launch(share=True)
 
340
  outputs=image_output
341
  )
342
 
343
+ with gr.Tab("Image Upscaler"):
344
+ with gr.Row():
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"), title="Image Upscaler")
354
+
355
+
356
  app.launch(share=True)