52Hz commited on
Commit
3ba5174
1 Parent(s): c3e15d2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -4,7 +4,7 @@ from PIL import Image
4
  import torch
5
 
6
  os.system(
7
- 'wget https://github.com/TentativeGitHub/CMFNet/releases/download/0.0/deraindrop_model.pth -P experiments/pretrained_models')
8
 
9
 
10
  def inference(img):
@@ -15,15 +15,15 @@ def inference(img):
15
  img = img.resize((basewidth, hsize), Image.BILINEAR)
16
  img.save("test/1.png", "PNG")
17
  os.system(
18
- 'python main_test_CMFNet.py --input_dir test --weights experiments/pretrained_models/deraindrop_model.pth')
19
  return 'results/1.png'
20
 
21
 
22
- title = "Compound Multi-branch Feature Fusion (Deraindrop)"
23
- description = "Gradio demo for CMFNet. CMFNet achieves competitive performance on three tasks: image deblurring, image dehazing and image deraindrop. Here, we provide a demo for image deraindrop. To use it, simply upload your image, or click one of the examples to load them."
24
  article = "<p style='text-align: center'><a href='https://' target='_blank'>Compound Multi-branch Feature Fusion for Real Image Restoration</a> | <a href='https://github.com/FanChiMao/CMFNet' target='_blank'>Github Repo</a></p>"
25
 
26
- examples = [['Rain.png']]
27
  gr.Interface(
28
  inference,
29
  [gr.inputs.Image(type="pil", label="Input")],
 
4
  import torch
5
 
6
  os.system(
7
+ 'wget https://github.com/TentativeGitHub/CMFNet/releases/download/0.0/dehaze_model.pth -P experiments/pretrained_models')
8
 
9
 
10
  def inference(img):
 
15
  img = img.resize((basewidth, hsize), Image.BILINEAR)
16
  img.save("test/1.png", "PNG")
17
  os.system(
18
+ 'python main_test_CMFNet.py --input_dir test --weights experiments/pretrained_models/dehaze_model.pth')
19
  return 'results/1.png'
20
 
21
 
22
+ title = "Compound Multi-branch Feature Fusion (Dehaze)"
23
+ description = "Gradio demo for CMFNet. CMFNet achieves competitive performance on three tasks: image deblurring, image dehazing and image deraindrop. Here, we provide a demo for image dehaze. To use it, simply upload your image, or click one of the examples to load them."
24
  article = "<p style='text-align: center'><a href='https://' target='_blank'>Compound Multi-branch Feature Fusion for Real Image Restoration</a> | <a href='https://github.com/FanChiMao/CMFNet' target='_blank'>Github Repo</a></p>"
25
 
26
+ examples = [['Haze.png']]
27
  gr.Interface(
28
  inference,
29
  [gr.inputs.Image(type="pil", label="Input")],