erinak commited on
Commit
f42c2f8
1 Parent(s): c42d65c

modify indent

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -64,11 +64,11 @@ def summy(text):
64
  """
65
  inputs = tokenizer_sum("summarize: " + text, return_tensors="pt")
66
  outputs = model_sum.generate(
67
- inputs["input_ids"],
68
- max_new_tokens=300, # 生成数の上限
69
- min_length=150, # 生成数の下限
70
- num_beams=5 # ビームサーチの設定
71
- )
72
  summarize_text = tokenizer_sum.decode(output[0], skip_special_tokens=True)
73
 
74
  return summarize_text
 
64
  """
65
  inputs = tokenizer_sum("summarize: " + text, return_tensors="pt")
66
  outputs = model_sum.generate(
67
+ inputs["input_ids"],
68
+ max_new_tokens=300, # 生成数の上限
69
+ min_length=150, # 生成数の下限
70
+ num_beams=5 # ビームサーチの設定
71
+ )
72
  summarize_text = tokenizer_sum.decode(output[0], skip_special_tokens=True)
73
 
74
  return summarize_text