mishtert commited on
Commit
a82fbb7
·
1 Parent(s): c406f15

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -75,7 +75,7 @@ def process_image(image):
75
  draw.rectangle(box, outline=label2color[predicted_label])
76
  draw.text((box[0]+10, box[1]-10), text=predicted_label, fill=label2color[predicted_label], font=font)
77
 
78
- return image
79
 
80
 
81
  title = "Invoice Extraction & Categorization"
@@ -92,7 +92,9 @@ css = ".image-preview {height: auto !important;}"
92
 
93
  iface = gr.Interface(fn=process_image,
94
  inputs=gr.inputs.Image(type="pil"),
95
- outputs= gr.outputs.Image(type="pil", label="Identified & Categorized Image"),
 
 
96
  title=title,
97
  description=description,
98
  # article=article,
 
75
  draw.rectangle(box, outline=label2color[predicted_label])
76
  draw.text((box[0]+10, box[1]-10), text=predicted_label, fill=label2color[predicted_label], font=font)
77
 
78
+ return image,outputs
79
 
80
 
81
  title = "Invoice Extraction & Categorization"
 
92
 
93
  iface = gr.Interface(fn=process_image,
94
  inputs=gr.inputs.Image(type="pil"),
95
+ # outputs= gr.outputs.Image(type="pil", label="Identified & Categorized Image"),
96
+ outputs= [gr.outputs.Image(type="pil", label="Identified & Categorized Image"),
97
+ gr.outputs.Image(type="pil", label="Identified & Categorized Image")],
98
  title=title,
99
  description=description,
100
  # article=article,