mishtert commited on
Commit
9ad2d00
1 Parent(s): 9448564

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
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,encoding.keys()
79
 
80
 
81
  title = "Invoice Extraction & Categorization"
@@ -92,9 +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
- outputs= [gr.outputs.Image(type="pil", label="Identified & Categorized Image"),
97
- gr.outputs.Textbox(type="text", label="Identified & Categorized Image")],
98
  title=title,
99
  description=description,
100
  # 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
+ # outputs= [gr.outputs.Image(type="pil", label="Identified & Categorized Image"),
97
+ # gr.outputs.Textbox(type="text", label="Identified & Categorized Image")],
98
  title=title,
99
  description=description,
100
  # article=article,