Spaces:
Running
on
L4
Running
on
L4
upgrade gradio.
Browse files
README.md
CHANGED
|
@@ -4,7 +4,7 @@ emoji: 🐼
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: green
|
| 6 |
sdk: gradio
|
| 7 |
-
sdk_version: 3.
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
|
|
|
| 4 |
colorFrom: blue
|
| 5 |
colorTo: green
|
| 6 |
sdk: gradio
|
| 7 |
+
sdk_version: 3.23.0
|
| 8 |
app_file: app.py
|
| 9 |
pinned: false
|
| 10 |
license: apache-2.0
|
app.py
CHANGED
|
@@ -205,7 +205,7 @@ def inference(image, background_enhance, face_upsample, upscale, codeformer_fide
|
|
| 205 |
imwrite(restored_img, str(save_path))
|
| 206 |
|
| 207 |
restored_img = cv2.cvtColor(restored_img, cv2.COLOR_BGR2RGB)
|
| 208 |
-
return restored_img
|
| 209 |
except Exception as error:
|
| 210 |
print('Global exception', error)
|
| 211 |
return None, None
|
|
@@ -261,8 +261,7 @@ demo = gr.Interface(
|
|
| 261 |
gr.inputs.Number(default=2, label="Rescaling_Factor (up to 4)"),
|
| 262 |
gr.Slider(0, 1, value=0.5, step=0.01, label='Codeformer_Fidelity (0 for better quality, 1 for better identity)')
|
| 263 |
], [
|
| 264 |
-
gr.outputs.Image(type="numpy", label="Output")
|
| 265 |
-
gr.outputs.File(label="Download the output")
|
| 266 |
],
|
| 267 |
title=title,
|
| 268 |
description=description,
|
|
|
|
| 205 |
imwrite(restored_img, str(save_path))
|
| 206 |
|
| 207 |
restored_img = cv2.cvtColor(restored_img, cv2.COLOR_BGR2RGB)
|
| 208 |
+
return restored_img
|
| 209 |
except Exception as error:
|
| 210 |
print('Global exception', error)
|
| 211 |
return None, None
|
|
|
|
| 261 |
gr.inputs.Number(default=2, label="Rescaling_Factor (up to 4)"),
|
| 262 |
gr.Slider(0, 1, value=0.5, step=0.01, label='Codeformer_Fidelity (0 for better quality, 1 for better identity)')
|
| 263 |
], [
|
| 264 |
+
gr.outputs.Image(type="numpy", label="Output")
|
|
|
|
| 265 |
],
|
| 266 |
title=title,
|
| 267 |
description=description,
|