Update app.py
Browse files
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,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=
|
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,
|