AItool commited on
Commit
dde6638
·
verified ·
1 Parent(s): 2b95ee5

Update app_enhance.py

Browse files
Files changed (1) hide show
  1. app_enhance.py +0 -4
app_enhance.py CHANGED
@@ -26,14 +26,11 @@ def runcmd(cmd, verbose = False):
26
  print(std_out.strip(), std_err)
27
  pass
28
 
29
-
30
  if not os.path.exists('GFPGANv1.4.pth'):
31
  runcmd("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth -P .")
32
  if not os.path.exists('realesr-general-x4v3.pth'):
33
  runcmd("wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth -P .")
34
 
35
-
36
-
37
  model = SRVGGNetCompact(num_in_ch=3, num_out_ch=3, num_feat=64, num_conv=32, upscale=4, act_type='prelu')
38
  model_path = 'realesr-general-x4v3.pth'
39
  half = True if torch.cuda.is_available() else "cpu"
@@ -98,7 +95,6 @@ def enhance_image(
98
 
99
 
100
  def create_demo() -> gr.Blocks:
101
-
102
  with gr.Blocks() as demo:
103
  with gr.Row():
104
  with gr.Column():
 
26
  print(std_out.strip(), std_err)
27
  pass
28
 
 
29
  if not os.path.exists('GFPGANv1.4.pth'):
30
  runcmd("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth -P .")
31
  if not os.path.exists('realesr-general-x4v3.pth'):
32
  runcmd("wget https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.5.0/realesr-general-x4v3.pth -P .")
33
 
 
 
34
  model = SRVGGNetCompact(num_in_ch=3, num_out_ch=3, num_feat=64, num_conv=32, upscale=4, act_type='prelu')
35
  model_path = 'realesr-general-x4v3.pth'
36
  half = True if torch.cuda.is_available() else "cpu"
 
95
 
96
 
97
  def create_demo() -> gr.Blocks:
 
98
  with gr.Blocks() as demo:
99
  with gr.Row():
100
  with gr.Column():