Spaces:
Sleeping
Sleeping
Commit
·
5b1b9e7
1
Parent(s):
bf31677
Update app.py
Browse files
app.py
CHANGED
@@ -7,7 +7,7 @@ def upscale_image(input_image):
|
|
7 |
upscale_factor = radio_input
|
8 |
output_image = cv2.resize(input_image, None, fx = upscale_factor, fy = upscale_factor, interpolation = cv2.INTER_CUBIC)
|
9 |
return output_image
|
10 |
-
radio_input = gr.Radio(label="Upscale Levels", choices=[
|
11 |
# Создаем интерфейс Gradio
|
12 |
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")
|
13 |
iface.launch()
|
|
|
7 |
upscale_factor = radio_input
|
8 |
output_image = cv2.resize(input_image, None, fx = upscale_factor, fy = upscale_factor, interpolation = cv2.INTER_CUBIC)
|
9 |
return output_image
|
10 |
+
radio_input = gr.Radio(label="Upscale Levels", choices=[2, 4], value=2)
|
11 |
# Создаем интерфейс Gradio
|
12 |
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")
|
13 |
iface.launch()
|