Spaces:
Running
on
Zero
Running
on
Zero
ohayonguy
commited on
Commit
•
cf5e6bf
1
Parent(s):
d1033a9
fixed loc of realesr
Browse files
app.py
CHANGED
@@ -17,12 +17,11 @@ torch.set_grad_enabled(False)
|
|
17 |
|
18 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
19 |
|
20 |
-
|
21 |
-
os.makedirs('pretrained_models')
|
22 |
realesr_model_path = 'pretrained_models/RealESRGAN_x4plus.pth'
|
23 |
if not os.path.exists(realesr_model_path):
|
24 |
os.system(
|
25 |
-
"wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth -O
|
26 |
|
27 |
# background enhancer with RealESRGAN
|
28 |
model = SRVGGNetCompact(num_in_ch=3, num_out_ch=3, num_feat=64, num_conv=32, upscale=4, act_type='prelu')
|
|
|
17 |
|
18 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
19 |
|
20 |
+
os.makedirs('pretrained_models', exist_ok=True)
|
|
|
21 |
realesr_model_path = 'pretrained_models/RealESRGAN_x4plus.pth'
|
22 |
if not os.path.exists(realesr_model_path):
|
23 |
os.system(
|
24 |
+
"wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth -O pretrained_models/RealESRGAN_x4plus.pth")
|
25 |
|
26 |
# background enhancer with RealESRGAN
|
27 |
model = SRVGGNetCompact(num_in_ch=3, num_out_ch=3, num_feat=64, num_conv=32, upscale=4, act_type='prelu')
|