DigiP-AI commited on
Commit
dbc87ba
·
verified ·
1 Parent(s): 78539a4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -0
app.py CHANGED
@@ -197,4 +197,14 @@ with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
197
  image_button = gr.Button("Run", variant='primary')
198
  image_button.click(flip_image, inputs=image_input, outputs=image_output)
199
 
 
 
 
 
 
 
 
 
 
 
200
  app.launch(show_api=False, share=False)
 
197
  image_button = gr.Button("Run", variant='primary')
198
  image_button.click(flip_image, inputs=image_input, outputs=image_output)
199
 
200
+ with gr.Tab("Image Upscaler"):
201
+ with gr.Row():
202
+ with gr.Column():
203
+ def upscale_image(input_image, radio_input):
204
+ upscale_factor = radio_input
205
+ output_image = cv2.resize(input_image, None, fx = upscale_factor, fy = upscale_factor, interpolation = cv2.INTER_CUBIC)
206
+ return output_image
207
+ radio_input = gr.Radio(label="Upscale Levels", choices=[2, 4, 6, 8, 10], value=2)
208
+ 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")
209
+
210
  app.launch(show_api=False, share=False)