danu9327 commited on
Commit
eacf79b
·
1 Parent(s): 0f691d3
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -116,7 +116,8 @@ def sepia(input_img):
116
  pred_img = pred_img.astype(np.uint8)
117
 
118
  fig = draw_plot(pred_img, seg)
119
- return fig
 
120
 
121
  demo = gr.Interface(fn=sepia,
122
  inputs=gr.Image(shape=(400, 600)),
 
116
  pred_img = pred_img.astype(np.uint8)
117
 
118
  fig = draw_plot(pred_img, seg)
119
+ filename = input_image.name if hasattr(input_image, "name") else "Unknown filename"
120
+ return fig, filename
121
 
122
  demo = gr.Interface(fn=sepia,
123
  inputs=gr.Image(shape=(400, 600)),