sczhou commited on
Commit
ae068c5
1 Parent(s): 9c18813

add download button (#2)

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -193,7 +193,7 @@ def inference(image, background_enhance, face_upsample, upscale, codeformer_fide
193
  imwrite(restored_img, str(save_path))
194
 
195
  restored_img = cv2.cvtColor(restored_img, cv2.COLOR_BGR2RGB)
196
- return restored_img
197
 
198
 
199
 
@@ -242,6 +242,7 @@ demo = gr.Interface(
242
  gr.Slider(0, 1, value=0.5, step=0.01, label='Codeformer_Fidelity: 0 for better quality, 1 for better identity')
243
  ], [
244
  gr.outputs.Image(type="numpy", label="Output"),
 
245
  ],
246
  title=title,
247
  description=description,
 
193
  imwrite(restored_img, str(save_path))
194
 
195
  restored_img = cv2.cvtColor(restored_img, cv2.COLOR_BGR2RGB)
196
+ return restored_img, save_path
197
 
198
 
199
 
 
242
  gr.Slider(0, 1, value=0.5, step=0.01, label='Codeformer_Fidelity: 0 for better quality, 1 for better identity')
243
  ], [
244
  gr.outputs.Image(type="numpy", label="Output"),
245
+ gr.outputs.File(label="Download the output")
246
  ],
247
  title=title,
248
  description=description,