File size: 596 Bytes
9567606
6ae8bb2
a8f0668
9567606
a76354d
bf31677
6ae8bb2
 
80c6ca6
bc4fe30
045d692
4d39928
045d692
1
2
3
4
5
6
7
8
9
10
11
12
13
import gradio as gr
import cv2
import numpy as np

def upscale_image(input_image, radio_input):
    upscale_factor = radio_input
    output_image = cv2.resize(input_image, None, fx = upscale_factor, fy = upscale_factor, interpolation = cv2.INTER_CUBIC)
    return output_image

radio_input = gr.Radio(label="Upscale Levels", choices=[2, 4, 6, 8, 10], value=2)

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", theme="Nymbo/Nymbo_Theme")
iface.launch(show_api=False)