DmitrMakeev commited on
Commit
67f4d77
1 Parent(s): 03b6dec

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -6
app.py CHANGED
@@ -17,10 +17,7 @@ if not os.path.exists('GFPGANv1.3.pth'):
17
  os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth -P .")
18
  if not os.path.exists('GFPGANv1.4.pth'):
19
  os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth -P .")
20
- if not os.path.exists('RestoreFormer.pth'):
21
- os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/RestoreFormer.pth -P .")
22
- if not os.path.exists('CodeFormer.pth'):
23
- os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.4/CodeFormer.pth -P .")
24
 
25
  torch.hub.download_url_to_file(
26
  'https://thumbs.dreamstime.com/b/tower-bridge-traditional-red-bus-black-white-colors-view-to-tower-bridge-london-black-white-colors-108478942.jpg',
@@ -119,9 +116,9 @@ demo = gr.Interface(
119
  inference, [
120
  gr.inputs.Image(type="filepath", label="Input"),
121
  # gr.inputs.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer', 'CodeFormer'], type="value", default='v1.4', label='version'),
122
- gr.inputs.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer','CodeFormer','RealESR-General-x4v3'], type="value", default='v1.4', label='version'),
123
  gr.inputs.Number(label="Rescaling factor", default=2),
124
- gr.Slider(0, 100, label='Weight, only for CodeFormer. 0 for better quality, 100 for better identity', default=50)
125
  ], [
126
  gr.outputs.Image(type="numpy", label="Output (The whole image)"),
127
  gr.outputs.File(label="Download the output image")
 
17
  os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.3.pth -P .")
18
  if not os.path.exists('GFPGANv1.4.pth'):
19
  os.system("wget https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv1.4.pth -P .")
20
+
 
 
 
21
 
22
  torch.hub.download_url_to_file(
23
  'https://thumbs.dreamstime.com/b/tower-bridge-traditional-red-bus-black-white-colors-view-to-tower-bridge-london-black-white-colors-108478942.jpg',
 
116
  inference, [
117
  gr.inputs.Image(type="filepath", label="Input"),
118
  # gr.inputs.Radio(['v1.2', 'v1.3', 'v1.4', 'RestoreFormer', 'CodeFormer'], type="value", default='v1.4', label='version'),
119
+ gr.inputs.Radio(['v1.2', 'v1.3', 'v1.4'], type="value", default='v1.4', label='version'),
120
  gr.inputs.Number(label="Rescaling factor", default=2),
121
+ # gr.Slider(0, 100, label='Weight, only for CodeFormer. 0 for better quality, 100 for better identity', default=50)
122
  ], [
123
  gr.outputs.Image(type="numpy", label="Output (The whole image)"),
124
  gr.outputs.File(label="Download the output image")