zbin1234 commited on
Commit
a7a6b50
1 Parent(s): 7edd73a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -4,7 +4,7 @@ summarizer = pipeline("summarization")
4
 
5
  def translate(text):
6
  text = text.replace(""",'"').replace("'","'").replace("&","&")
7
- result = summarizer(text,min_length=180,truncation=True,clean_up_tokenization_spaces=True)
8
  return result[0]["summary_text"]
9
 
10
  iface = gr.Interface(fn=translate,
 
4
 
5
  def translate(text):
6
  text = text.replace(""",'"').replace("'","'").replace("&","&")
7
+ result = summarizer(text, max_length=45, clean_up_tokenization_spaces=True)
8
  return result[0]["summary_text"]
9
 
10
  iface = gr.Interface(fn=translate,