Leesn465 commited on
Commit
61784ab
·
verified ·
1 Parent(s): c3541f8

Update keyword_module.py

Browse files
Files changed (1) hide show
  1. keyword_module.py +2 -0
keyword_module.py CHANGED
@@ -19,6 +19,8 @@ def summarize_kobart(text):
19
  truncation=True,
20
  max_length=512, # 모델에 맞게 조정 (512/1024 중 하나일 확률 큼)
21
  )
 
 
22
 
23
  summary_ids = summary_model.generate(
24
  **inputs,
 
19
  truncation=True,
20
  max_length=512, # 모델에 맞게 조정 (512/1024 중 하나일 확률 큼)
21
  )
22
+ if "token_type_ids" in inputs:
23
+ inputs.pop("token_type_ids")
24
 
25
  summary_ids = summary_model.generate(
26
  **inputs,