Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -19,14 +19,6 @@ def realesrgan(img, model_name, denoise_strength, face_enhance, outscale):
|
|
19 |
"""
|
20 |
if not img:
|
21 |
return
|
22 |
-
if model_name == "none":
|
23 |
-
print("No model selected. Returning original image.")
|
24 |
-
cv_img = numpy.array(img)
|
25 |
-
out_filename = f"output_{rnd_string(8)}.png"
|
26 |
-
cv2.imwrite(out_filename, cv_img)
|
27 |
-
last_file = out_filename
|
28 |
-
return out_filename
|
29 |
-
# Define model parameters
|
30 |
if model_name == 'RealESRGAN_x4plus': # x4 RRDBNet model
|
31 |
model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=4)
|
32 |
netscale = 4
|
|
|
19 |
"""
|
20 |
if not img:
|
21 |
return
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
22 |
if model_name == 'RealESRGAN_x4plus': # x4 RRDBNet model
|
23 |
model = RRDBNet(num_in_ch=3, num_out_ch=3, num_feat=64, num_block=23, num_grow_ch=32, scale=4)
|
24 |
netscale = 4
|