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

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
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, token_boxes
79
 
80
 
81
  title = "Invoice Extraction & Categorization"
@@ -92,8 +92,7 @@ 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
- gr.outputs.Textbox(type="text", label="Categorized item")],
97
  title=title,
98
  description=description,
99
  # 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
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
  title=title,
97
  description=description,
98
  # article=article,