Update app.py
Browse files
app.py
CHANGED
@@ -46,6 +46,8 @@ def draw_entity_boxes_on_image(image, entities, show=False, save_path=None, enti
|
|
46 |
image (_type_): image or image path
|
47 |
collect_entity_location (_type_): _description_
|
48 |
"""
|
|
|
|
|
49 |
if isinstance(image, Image.Image):
|
50 |
image_h = image.height
|
51 |
image_w = image.width
|
@@ -202,7 +204,7 @@ def main():
|
|
202 |
# By default, the generated text is cleanup and the entities are extracted.
|
203 |
processed_text, entities = processor.post_process_generation(generated_text)
|
204 |
|
205 |
-
annotated_image =
|
206 |
|
207 |
color_id = -1
|
208 |
entity_info = []
|
|
|
46 |
image (_type_): image or image path
|
47 |
collect_entity_location (_type_): _description_
|
48 |
"""
|
49 |
+
return image
|
50 |
+
|
51 |
if isinstance(image, Image.Image):
|
52 |
image_h = image.height
|
53 |
image_w = image.width
|
|
|
204 |
# By default, the generated text is cleanup and the entities are extracted.
|
205 |
processed_text, entities = processor.post_process_generation(generated_text)
|
206 |
|
207 |
+
annotated_image = draw_entity_boxes_on_image(image_input, entities, show=False)
|
208 |
|
209 |
color_id = -1
|
210 |
entity_info = []
|