Spaces:
Running
Running
Update knowledgeassistant/components/summarization.py
Browse files
knowledgeassistant/components/summarization.py
CHANGED
@@ -21,13 +21,9 @@ class DataSummarization:
|
|
21 |
logging.info("Summarization Pipeline Successfully Setup")
|
22 |
|
23 |
text = read_txt_file(input_text_path)
|
24 |
-
|
25 |
-
|
26 |
-
if not text.strip():
|
27 |
-
raise KnowledgeAssistantException("Input text is empty")
|
28 |
-
|
29 |
summary = pipe(text, min_length = min_length, do_sample = False)
|
30 |
-
|
31 |
logging.info("Text successfully summarized")
|
32 |
|
33 |
write_txt_file(self.data_summarization_config.summarized_text_file_path, summary[0].get("summary_text"))
|
|
|
21 |
logging.info("Summarization Pipeline Successfully Setup")
|
22 |
|
23 |
text = read_txt_file(input_text_path)
|
24 |
+
print(f"Input Text: {text[:500]}")
|
|
|
|
|
|
|
|
|
25 |
summary = pipe(text, min_length = min_length, do_sample = False)
|
26 |
+
print(f"Summary Output: {summary}")
|
27 |
logging.info("Text successfully summarized")
|
28 |
|
29 |
write_txt_file(self.data_summarization_config.summarized_text_file_path, summary[0].get("summary_text"))
|