Meloo commited on
Commit
7818cda
1 Parent(s): cc820a1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -152,11 +152,11 @@ def inference(image, upscale, large_input_flag, color_fix):
152
  # output = np.transpose(output[[2, 1, 0], :, :], (1, 2, 0))
153
  output = (output * 255.0).round().astype(np.uint8)
154
 
155
- # save results
156
- save_path = './out.png'
157
- cv2.imwrite(save_path, output)
158
 
159
- return (image, Image.fromarray(output)), save_path
160
 
161
 
162
 
@@ -239,9 +239,12 @@ demo = gr.Interface(
239
  type="pil",
240
  show_download_button=True,
241
  ),
 
 
 
 
242
  gr.Image(
243
- label="Download Output",
244
- type='filepath'
245
  ),
246
  ],
247
  title=title,
 
152
  # output = np.transpose(output[[2, 1, 0], :, :], (1, 2, 0))
153
  output = (output * 255.0).round().astype(np.uint8)
154
 
155
+ # # save results
156
+ # save_path = './out.png'
157
+ # cv2.imwrite(save_path, output)
158
 
159
+ return (image, Image.fromarray(output)), output #, save_path
160
 
161
 
162
 
 
239
  type="pil",
240
  show_download_button=True,
241
  ),
242
+ # gr.Image(
243
+ # label="Download Output",
244
+ # type='filepath'
245
+ # ),
246
  gr.Image(
247
+ label="Download Output"
 
248
  ),
249
  ],
250
  title=title,