52Hz commited on
Commit
6e75204
1 Parent(s): 99302dc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -13,17 +13,17 @@ def inference(img):
13
  wpercent = (basewidth / float(img.size[0]))
14
  hsize = int((float(img.size[1]) * float(wpercent)))
15
  img = img.resize((basewidth, hsize), Image.ANTIALIAS)
16
- img.save("test/1.jpg", "JPEG")
17
  os.system(
18
- 'python main_test_SRMNet.py --weights experiments/pretrained_models/AWGN_denoising_SRMNet.pth')
19
- return 'result/out.png'
20
 
21
 
22
  title = "Compound Multi-branch Feature Fusion (Deraindrop)"
23
  description = "Gradio demo for CMFNet. CMFNet achieves state-of-the-art performance on six tasks: image super-resolution (including classical, lightweight and real-world image super-resolution), image denoising (including grayscale and color image denoising) and JPEG compression artifact reduction. See the paper and project page for detailed results below. Here, we provide a demo for real-world image SR.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://arxiv.org/abs/2108.10257' target='_blank'>SwinIR: Image Restoration Using Swin Transformer</a> | <a href='https://github.com/JingyunLiang/SwinIR' target='_blank'>Github Repo</a></p>"
25
 
26
- examples = [['Noise.png']]
27
  gr.Interface(
28
  inference,
29
  [gr.inputs.Image(type="pil", label="Input")],
 
13
  wpercent = (basewidth / float(img.size[0]))
14
  hsize = int((float(img.size[1]) * float(wpercent)))
15
  img = img.resize((basewidth, hsize), Image.ANTIALIAS)
16
+ img.save("test/1.png", "PNG")
17
  os.system(
18
+ 'python main_test_CMFNet.py --weights experiments/pretrained_models/deraindrop_model.pth')
19
+ return 'result/1.png'
20
 
21
 
22
  title = "Compound Multi-branch Feature Fusion (Deraindrop)"
23
  description = "Gradio demo for CMFNet. CMFNet achieves state-of-the-art performance on six tasks: image super-resolution (including classical, lightweight and real-world image super-resolution), image denoising (including grayscale and color image denoising) and JPEG compression artifact reduction. See the paper and project page for detailed results below. Here, we provide a demo for real-world image SR.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://arxiv.org/abs/2108.10257' target='_blank'>SwinIR: Image Restoration Using Swin Transformer</a> | <a href='https://github.com/JingyunLiang/SwinIR' target='_blank'>Github Repo</a></p>"
25
 
26
+ examples = [['Rain.png']]
27
  gr.Interface(
28
  inference,
29
  [gr.inputs.Image(type="pil", label="Input")],