Spaces:
Running
Running
Update knowledgeassistant/components/summarization.py
Browse files
knowledgeassistant/components/summarization.py
CHANGED
@@ -17,8 +17,7 @@ class DataSummarization:
|
|
17 |
|
18 |
def summarize(self, input_text_path: str, min_length: int):
|
19 |
try:
|
20 |
-
|
21 |
-
pipe = pipeline("summarization", model="facebook/bart-large-cnn", device=0 if device == "cuda" else -1)
|
22 |
logging.info("Summarization Pipeline Successfully Setup")
|
23 |
|
24 |
text = read_txt_file(input_text_path)
|
|
|
17 |
|
18 |
def summarize(self, input_text_path: str, min_length: int):
|
19 |
try:
|
20 |
+
pipe = pipeline("summarization", model="facebook/bart-large-cnn")
|
|
|
21 |
logging.info("Summarization Pipeline Successfully Setup")
|
22 |
|
23 |
text = read_txt_file(input_text_path)
|