danielsapit commited on
Commit
8cdc393
1 Parent(s): deb9da6

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -13,7 +13,6 @@ for model_path in ['fbcnn_gray.pth','fbcnn_color.pth']:
13
  if os.path.exists(model_path):
14
  print(f'loading model from {model_path}')
15
  else:
16
- #os.makedirs(os.path.dirname(model_path), exist_ok=True)
17
  url = 'https://github.com/jiaxi-jiang/FBCNN/releases/download/v1.0/{}'.format(os.path.basename(model_path))
18
  r = requests.get(url, allow_redirects=True)
19
  open(model_path, 'wb').write(r.content)
@@ -112,12 +111,12 @@ def inference(input_img, is_gray, input_quality, enable_zoom, zoom, x_shift, y_s
112
 
113
  interface = gr.Interface(
114
  fn = inference,
115
- inputs = [gr.inputs.Image(),
116
  gr.inputs.Checkbox(label="Grayscale (Check this if your image is grayscale)"),
117
  gr.inputs.Slider(minimum=1, maximum=100, step=1, label="Intensity (Higher = stronger JPEG artifact removal)"),
118
  gr.inputs.Checkbox(default=False, label="Edit Zoom preview (This is optional. "
119
- "Check this after the image result is loaded to edit zoom parameters "
120
- "without processing the input image.)"),
121
  gr.inputs.Slider(minimum=10, maximum=100, step=1, default=50, label="Zoom Image "
122
  "(Use this to see the image quality up close. "
123
  "100 = original size)"),
 
13
  if os.path.exists(model_path):
14
  print(f'loading model from {model_path}')
15
  else:
 
16
  url = 'https://github.com/jiaxi-jiang/FBCNN/releases/download/v1.0/{}'.format(os.path.basename(model_path))
17
  r = requests.get(url, allow_redirects=True)
18
  open(model_path, 'wb').write(r.content)
 
111
 
112
  interface = gr.Interface(
113
  fn = inference,
114
+ inputs = [gr.inputs.Image(label="Input Image"),
115
  gr.inputs.Checkbox(label="Grayscale (Check this if your image is grayscale)"),
116
  gr.inputs.Slider(minimum=1, maximum=100, step=1, label="Intensity (Higher = stronger JPEG artifact removal)"),
117
  gr.inputs.Checkbox(default=False, label="Edit Zoom preview (This is optional. "
118
+ "After the image result is loaded, check this to edit zoom parameters "
119
+ "so that the input image will not be processed when the submit button is pressed.)"),
120
  gr.inputs.Slider(minimum=10, maximum=100, step=1, default=50, label="Zoom Image "
121
  "(Use this to see the image quality up close. "
122
  "100 = original size)"),