soiz commited on
Commit
bfb2718
·
verified ·
1 Parent(s): 522f04e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -22,7 +22,11 @@ pretrain_model_url = {
22
  'parsing': 'https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth',
23
  'realesrgan': 'https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/RealESRGAN_x2plus.pth'
24
  }
25
-
 
 
 
 
26
  # Download weights if not already present
27
  for key, url in pretrain_model_url.items():
28
  file_path = f"CodeFormer/weights/{key}/{url.split('/')[-1]}"
 
22
  'parsing': 'https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/parsing_parsenet.pth',
23
  'realesrgan': 'https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/RealESRGAN_x2plus.pth'
24
  }
25
+ load_file_from_url(
26
+ url='https://github.com/sczhou/CodeFormer/releases/download/v0.1.0/codeformer.pth',
27
+ model_dir='CodeFormer/weights/CodeFormer',
28
+ progress=True
29
+ )
30
  # Download weights if not already present
31
  for key, url in pretrain_model_url.items():
32
  file_path = f"CodeFormer/weights/{key}/{url.split('/')[-1]}"