awitecki commited on
Commit
0ec8d43
1 Parent(s): efe9ec2

Fix num_beams #2

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -49,7 +49,7 @@ learn.create_opt()
49
  learn.freeze()
50
 
51
  def get_summary(text, sequences_num):
52
- return learn.blurr_summarize(text, early_stopping=True, num_beams=sequences_num, num_return_sequences=sequences_num)[0]
53
 
54
  iface = gr.Interface(fn=get_summary, inputs=["text", gr.Number(value=5, label="sequences")], outputs="text")
55
  iface.launch()
 
49
  learn.freeze()
50
 
51
  def get_summary(text, sequences_num):
52
+ return learn.blurr_summarize(text, early_stopping=True, num_beams=int(sequences_num), num_return_sequences=int(sequences_num))[0]
53
 
54
  iface = gr.Interface(fn=get_summary, inputs=["text", gr.Number(value=5, label="sequences")], outputs="text")
55
  iface.launch()