broadfield-dev commited on
Commit
da702bd
·
verified ·
1 Parent(s): 408592d

Update blueprints/summarize.py

Browse files
Files changed (1) hide show
  1. blueprints/summarize.py +8 -2
blueprints/summarize.py CHANGED
@@ -66,8 +66,14 @@ def run_inference_logic(config):
66
  }
67
 
68
  elif task_type == 'SEQ_2_SEQ_LM':
69
- # Summarization specific args
70
- out = pipe(text, max_length=512, min_length=30, do_sample=False)
 
 
 
 
 
 
71
  return {"output": out[0]['summary_text']}
72
 
73
  else:
 
66
  }
67
 
68
  elif task_type == 'SEQ_2_SEQ_LM':
69
+ out = pipe(
70
+ text,
71
+ max_length=512,
72
+ min_length=30,
73
+ do_sample=True,
74
+ temperature=config['temp'],
75
+ top_k=config['topk']
76
+ )
77
  return {"output": out[0]['summary_text']}
78
 
79
  else: