提交 10ab8ea5 编写于 作者: L LielinJiang

fix apps output when input is image

上级 f9aa9307
......@@ -133,8 +133,10 @@ class DeOldifyPredictor(BasePredictor):
else:
pred_img = self.run_image(input)
out_path = None
if self.output:
base_name = os.path.basename(input)
pred_img.save(os.path.join(self.output, base_name + '.png'))
base_name = os.path.splitext(os.path.basename(input))[0]
out_path = os.path.join(self.output, base_name + '.png')
pred_img.save(out_path)
return pred_img
return pred_img, out_path
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册