Removed image.show
Browse files
main.py
CHANGED
@@ -47,7 +47,6 @@ async def ProcessDocument(file: str = Form(...)):
|
|
47 |
|
48 |
def LabelTokens(content):
|
49 |
image = Image.open(io.BytesIO(content))
|
50 |
-
image.show()
|
51 |
ocr_df = config['vision_client'].ocr(content, image)
|
52 |
input_ids, attention_mask, token_type_ids, bbox, token_actual_boxes, offset_mapping = config['processor'].process(ocr_df, image = image)
|
53 |
token_labels = token_classification.classifyTokens(config['ser_model'], input_ids, attention_mask, bbox, offset_mapping)
|
|
|
47 |
|
48 |
def LabelTokens(content):
|
49 |
image = Image.open(io.BytesIO(content))
|
|
|
50 |
ocr_df = config['vision_client'].ocr(content, image)
|
51 |
input_ids, attention_mask, token_type_ids, bbox, token_actual_boxes, offset_mapping = config['processor'].process(ocr_df, image = image)
|
52 |
token_labels = token_classification.classifyTokens(config['ser_model'], input_ids, attention_mask, bbox, offset_mapping)
|