to-be commited on
Commit
a1caa30
1 Parent(s): 6ac1620

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -6
app.py CHANGED
@@ -14,7 +14,6 @@ import numpy as np
14
  examples = [['sample1.png'],
15
  ['sample2.png']]
16
 
17
- inference_on = ['Full Resolution Image', 'Downsampled Image']
18
 
19
  title = "Restormer"
20
  description = """
@@ -27,13 +26,11 @@ Gradio demo for <b>Restormer: Efficient Transformer for High-Resolution Image Re
27
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2111.09881'>Restormer: Efficient Transformer for High-Resolution Image Restoration </a> | <a href='https://github.com/swz30/Restormer'>Github Repo</a></p>"
28
 
29
 
30
- def inference(img, task, run_on):
31
  if not os.path.exists('temp'):
32
  os.system('mkdir temp')
33
 
34
- if run_on == 'Full Resolution Image':
35
- img = img
36
- else: # 'Downsampled Image'
37
  #### Resize the longer edge of the input image
38
  max_res = 512
39
  width, height = img.size
@@ -86,7 +83,6 @@ gr.Interface(
86
  [
87
  gr.Image(type="pil", label="Input"),
88
  gr.Radio(["Deraining"], default="Denoising", label='task'),
89
- gr.Dropdown(choices=inference_on, type="value", default='Downsampled Image', label='Inference on')
90
 
91
  ],
92
  gr.Image(type="pil", label="cleaned and restored"),
 
14
  examples = [['sample1.png'],
15
  ['sample2.png']]
16
 
 
17
 
18
  title = "Restormer"
19
  description = """
 
26
  article = "<p style='text-align: center'><a href='https://arxiv.org/abs/2111.09881'>Restormer: Efficient Transformer for High-Resolution Image Restoration </a> | <a href='https://github.com/swz30/Restormer'>Github Repo</a></p>"
27
 
28
 
29
+ def inference(img, task):
30
  if not os.path.exists('temp'):
31
  os.system('mkdir temp')
32
 
33
+ # 'Downsampled Image'
 
 
34
  #### Resize the longer edge of the input image
35
  max_res = 512
36
  width, height = img.size
 
83
  [
84
  gr.Image(type="pil", label="Input"),
85
  gr.Radio(["Deraining"], default="Denoising", label='task'),
 
86
 
87
  ],
88
  gr.Image(type="pil", label="cleaned and restored"),