From 08b3c821e7c75a35bb7f05f8ba83e06cf2766cb4 Mon Sep 17 00:00:00 2001 From: Dicklesworthstone Date: Mon, 20 May 2024 01:48:12 -0400 Subject: [PATCH] Fix --- service_functions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/service_functions.py b/service_functions.py index 645850f..ea64e83 100644 --- a/service_functions.py +++ b/service_functions.py @@ -688,7 +688,7 @@ def convert_document_to_sentences_func(file_path: str) -> Dict[str, Any]: with open(file_path, 'rb') as file: input_data_binary = file.read() result = magika.identify_bytes(input_data_binary) - detected_data_type = result['output']['ct_label'] + detected_data_type = result.output.ct_label try: if detected_data_type.startswith('text/'): content = input_data_binary.decode('utf-8')