johnnyfivefingers commited on
Commit
c10aecf
·
1 Parent(s): 65a92a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -11,7 +11,8 @@ summarizer = pipeline("summarization", model=model_id)
11
 
12
  def summarize(text):
13
  #return "Summary: " + text
14
- return "Summary: " + str(summarizer(text)[0]["summary_text"])
 
15
 
16
  iface = gr.Interface(fn=summarize, inputs="text", outputs="text")
17
  iface.launch()
 
11
 
12
  def summarize(text):
13
  #return "Summary: " + text
14
+ out = summarizer_bart(text, max_length=70, min_length = 35)
15
+ return "Summary: " + str(out)
16
 
17
  iface = gr.Interface(fn=summarize, inputs="text", outputs="text")
18
  iface.launch()