PRAli22 commited on
Commit
19e66b2
1 Parent(s): f022e05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -12,8 +12,8 @@ def summarize(text):
12
  summarized_ids = model.generate(inputs['input_ids'], attention_mask=inputs['attention_mask'],
13
  max_length=150, num_beams=4, early_stopping=True)
14
 
15
- return " ".join([tokenizer.decode(token_ids, skip_special_tokens=True)
16
- for token_ids in summarized_ids])
17
 
18
 
19
 
 
12
  summarized_ids = model.generate(inputs['input_ids'], attention_mask=inputs['attention_mask'],
13
  max_length=150, num_beams=4, early_stopping=True)
14
 
15
+ return tokenizer.decode(summarized_ids[0], skip_special_tokens=True)
16
+
17
 
18
 
19