Fix num_beams #2
Browse files
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()
|