Update summarize.py
Browse files- summarize.py +1 -0
summarize.py
CHANGED
@@ -53,6 +53,7 @@ def summarize(ids, mask, model, tokenizer, **kwargs):
|
|
53 |
input_ids,
|
54 |
attention_mask=attention_mask,
|
55 |
#global_attention_mask=global_attention_mask,
|
|
|
56 |
**kwargs,
|
57 |
)
|
58 |
summary = tokenizer.batch_decode(
|
|
|
53 |
input_ids,
|
54 |
attention_mask=attention_mask,
|
55 |
#global_attention_mask=global_attention_mask,
|
56 |
+
return_dict_in_generate=True,
|
57 |
**kwargs,
|
58 |
)
|
59 |
summary = tokenizer.batch_decode(
|