danielsapit commited on
Commit
b002866
·
1 Parent(s): 10907b9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -82,13 +82,12 @@ def inference(input_img, is_gray, input_quality, zoom, x_shift, y_shift):
82
  # ------------------------------------
83
 
84
  img_E,QF = model(img_L)
85
- QF = 1- QF
86
  img_E = util.tensor2single(img_E)
87
  img_E = util.single2uint(img_E)
88
 
89
  qf_input = torch.tensor([[1-input_quality/100]]).cuda() if device == torch.device('cuda') else torch.tensor([[1-input_quality/100]])
90
  img_E,QF = model(img_L, qf_input)
91
- QF = 1- QF
92
  img_E = util.tensor2single(img_E)
93
  img_E = util.single2uint(img_E)
94
 
@@ -138,7 +137,7 @@ gr.Interface(
138
  ["text.jpg",True,70,50,11,29]],
139
  title = "JPEG Artifacts Removal [FBCNN]",
140
  description = "Gradio Demo for JPEG Artifacts Removal. To use it, simply upload your image, "
141
- "or click one of the examples to load them. Check out the paper and the original GitHub repo at the link below. "
142
  "JPEG artifacts are noticeable distortion of images caused by JPEG lossy compression. "
143
  "This is not a super resolution AI but a JPEG compression artifact remover.",
144
  article = "<p style='text-align: center;'><a href='https://github.com/jiaxi-jiang/FBCNN'>FBCNN GitHub Repo</a><br>"
 
82
  # ------------------------------------
83
 
84
  img_E,QF = model(img_L)
 
85
  img_E = util.tensor2single(img_E)
86
  img_E = util.single2uint(img_E)
87
 
88
  qf_input = torch.tensor([[1-input_quality/100]]).cuda() if device == torch.device('cuda') else torch.tensor([[1-input_quality/100]])
89
  img_E,QF = model(img_L, qf_input)
90
+
91
  img_E = util.tensor2single(img_E)
92
  img_E = util.single2uint(img_E)
93
 
 
137
  ["text.jpg",True,70,50,11,29]],
138
  title = "JPEG Artifacts Removal [FBCNN]",
139
  description = "Gradio Demo for JPEG Artifacts Removal. To use it, simply upload your image, "
140
+ "or click one of the examples to load them. Check out the paper and the original GitHub repo at the links below. "
141
  "JPEG artifacts are noticeable distortion of images caused by JPEG lossy compression. "
142
  "This is not a super resolution AI but a JPEG compression artifact remover.",
143
  article = "<p style='text-align: center;'><a href='https://github.com/jiaxi-jiang/FBCNN'>FBCNN GitHub Repo</a><br>"