Update digestor.py
Browse files- digestor.py +2 -1
digestor.py
CHANGED
|
@@ -88,7 +88,7 @@ class Digestor:
|
|
| 88 |
# Start chunk timer
|
| 89 |
with Timer(name=f"{stub.hed}_chunk_time", logger=None):
|
| 90 |
chunk_list = self.chunk_piece(text, self.word_limit, stub.source.source_summarization_checkpoint)
|
| 91 |
-
print(f"""\n\n=============\nchunkList: {chunk_list}\n===========================\n\n""")
|
| 92 |
# start totoal summarization timer. Summarization queries are timed in 'perform_summarzation()'
|
| 93 |
with Timer(name=f"{stub.hed}_summary_time", text="Whole article summarization time: {:.4f} seconds"):
|
| 94 |
summary = self.perform_summarization(
|
|
@@ -194,6 +194,7 @@ class Digestor:
|
|
| 194 |
print("Summarization error, repeating...")
|
| 195 |
print(e)
|
| 196 |
repeat+=1
|
|
|
|
| 197 |
if summarized_chunk is not None:
|
| 198 |
collection_bin.append(summarized_chunk)
|
| 199 |
return collection_bin
|
|
|
|
| 88 |
# Start chunk timer
|
| 89 |
with Timer(name=f"{stub.hed}_chunk_time", logger=None):
|
| 90 |
chunk_list = self.chunk_piece(text, self.word_limit, stub.source.source_summarization_checkpoint)
|
| 91 |
+
print(f"""\n\n=============\nchunkList: {len(chunk_list)4}\n===========================\n\n""")
|
| 92 |
# start totoal summarization timer. Summarization queries are timed in 'perform_summarzation()'
|
| 93 |
with Timer(name=f"{stub.hed}_summary_time", text="Whole article summarization time: {:.4f} seconds"):
|
| 94 |
summary = self.perform_summarization(
|
|
|
|
| 194 |
print("Summarization error, repeating...")
|
| 195 |
print(e)
|
| 196 |
repeat+=1
|
| 197 |
+
print(summarized_chunk)
|
| 198 |
if summarized_chunk is not None:
|
| 199 |
collection_bin.append(summarized_chunk)
|
| 200 |
return collection_bin
|