Cynthiaaaaaaaa commited on
Commit
736f9af
1 Parent(s): 36c571c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,8 +5,8 @@ from transformers import pipeline
5
  # Summarization
6
  def summarization(text):
7
  text_model = pipeline("text-generation", model="ainize/bart-base-cnn")
8
- summary = text_model(text, max_length=100, temperature=1.0, return_full_text=False)[0]
9
- return {"generated_text": summary["generated_text"]}
10
 
11
 
12
  # Sentiment Classification
 
5
  # Summarization
6
  def summarization(text):
7
  text_model = pipeline("text-generation", model="ainize/bart-base-cnn")
8
+ summary = text_model(text, max_length=100, temperature=1.0)[0]["generated_text"]
9
+ return summary
10
 
11
 
12
  # Sentiment Classification