Ahsen Khaliq commited on
Commit
71ea2e1
1 Parent(s): 504b262

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -5,8 +5,6 @@ os.system("wget https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/mo
5
  os.system("wget https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/models/rrdb_realesrnet_psnr.pth -P ./weights/")
6
 
7
  import gradio as gr
8
- torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Abraham_Lincoln_O-77_matte_collodion_print.jpg/1024px-Abraham_Lincoln_O-77_matte_collodion_print.jpg', 'lincoln.jpg')
9
- torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/5/50/Albert_Einstein_%28Nobel%29.png', 'einstein.png')
10
 
11
  '''
12
  @paper: GAN Prior Embedded Network for Blind Face Restoration in the Wild (CVPR2021)
@@ -25,6 +23,9 @@ from face_parse.face_parsing import FaceParse
25
  from face_model.face_gan import FaceGAN
26
  from sr_model.real_esrnet import RealESRNet
27
  from align_faces import warp_and_crop_face, get_reference_facial_points
 
 
 
28
 
29
  class FaceEnhancement(object):
30
  def __init__(self, base_dir='./', size=512, model=None, use_sr=True, sr_model=None, channel_multiplier=2, narrow=1, key=None, device='cuda'):
 
5
  os.system("wget https://public-vigen-video.oss-cn-shanghai.aliyuncs.com/robin/models/rrdb_realesrnet_psnr.pth -P ./weights/")
6
 
7
  import gradio as gr
 
 
8
 
9
  '''
10
  @paper: GAN Prior Embedded Network for Blind Face Restoration in the Wild (CVPR2021)
 
23
  from face_model.face_gan import FaceGAN
24
  from sr_model.real_esrnet import RealESRNet
25
  from align_faces import warp_and_crop_face, get_reference_facial_points
26
+ import torch
27
+ torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/thumb/a/ab/Abraham_Lincoln_O-77_matte_collodion_print.jpg/1024px-Abraham_Lincoln_O-77_matte_collodion_print.jpg', 'lincoln.jpg')
28
+ torch.hub.download_url_to_file('https://upload.wikimedia.org/wikipedia/commons/5/50/Albert_Einstein_%28Nobel%29.png', 'einstein.png')
29
 
30
  class FaceEnhancement(object):
31
  def __init__(self, base_dir='./', size=512, model=None, use_sr=True, sr_model=None, channel_multiplier=2, narrow=1, key=None, device='cuda'):