From ec31a71c90333c55df72180d126eb94224bbca86 Mon Sep 17 00:00:00 2001 From: Philippe Martin Date: Wed, 20 Nov 2024 09:26:36 +0100 Subject: [PATCH] fix: support application/octet-stream file type Signed-off-by: Philippe Martin --- .../natural_language_processing/summarizer/app/summarizer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recipes/natural_language_processing/summarizer/app/summarizer.py b/recipes/natural_language_processing/summarizer/app/summarizer.py index 487e9f8b..7caf86dd 100644 --- a/recipes/natural_language_processing/summarizer/app/summarizer.py +++ b/recipes/natural_language_processing/summarizer/app/summarizer.py @@ -78,7 +78,7 @@ def read_file(file): pages = loader.load() text = "".join([p.page_content for p in pages]) - if file_type in ["text/markdown", "text/plain"]: + if file_type in ["text/markdown", "text/plain", "application/octet-stream"]: text = file.read().decode() return text