Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -2,7 +2,6 @@ import numpy as np
|
|
2 |
import cv2
|
3 |
import onnxruntime
|
4 |
import gradio as gr
|
5 |
-
from gradio_imageslider import ImageSlider
|
6 |
|
7 |
article_text = """
|
8 |
<div style="text-align: center;">
|
@@ -74,7 +73,7 @@ def upscale(image, model):
|
|
74 |
elif img.shape[2] == 3:
|
75 |
image_output = post_process(inference(model_path, pre_process(img))) # BGR
|
76 |
|
77 |
-
return
|
78 |
|
79 |
|
80 |
css = ".output-image, .input-image, .image-preview {height: 480px !important} "
|
@@ -99,7 +98,7 @@ gr.Interface(
|
|
99 |
# label="Choose Upscaler",
|
100 |
# )
|
101 |
# ],
|
102 |
-
outputs=
|
103 |
# title="Image Upscaler PRO ⚡",
|
104 |
# description="Model: [Anchor-based Plain Net for Mobile Image Super-Resolution](https://arxiv.org/abs/2105.09750). Repository: [SR Mobile PyTorch](https://github.com/w11wo/sr_mobile_pytorch)",
|
105 |
description = """
|
|
|
2 |
import cv2
|
3 |
import onnxruntime
|
4 |
import gradio as gr
|
|
|
5 |
|
6 |
article_text = """
|
7 |
<div style="text-align: center;">
|
|
|
73 |
elif img.shape[2] == 3:
|
74 |
image_output = post_process(inference(model_path, pre_process(img))) # BGR
|
75 |
|
76 |
+
return image_output
|
77 |
|
78 |
|
79 |
css = ".output-image, .input-image, .image-preview {height: 480px !important} "
|
|
|
98 |
# label="Choose Upscaler",
|
99 |
# )
|
100 |
# ],
|
101 |
+
outputs="image",
|
102 |
# title="Image Upscaler PRO ⚡",
|
103 |
# description="Model: [Anchor-based Plain Net for Mobile Image Super-Resolution](https://arxiv.org/abs/2105.09750). Repository: [SR Mobile PyTorch](https://github.com/w11wo/sr_mobile_pytorch)",
|
104 |
description = """
|