craigchen commited on
Commit
7962213
·
1 Parent(s): 6785767
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -83,8 +83,8 @@ def generate_title():
83
  # compute predictions
84
  outputs = model.generate(**inputs, do_sample=True, temperature=temperature)
85
  decoded_outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)
86
- # predicted_titles = [decoded_output[0] for decoded_output in decoded_outputs]
87
- predicted_titles = [nltk.sent_tokenize(decoded_output.strip())[0] for decoded_output in decoded_outputs]
88
 
89
  st.session_state.titles = predicted_titles
90
 
 
83
  # compute predictions
84
  outputs = model.generate(**inputs, do_sample=True, temperature=temperature)
85
  decoded_outputs = tokenizer.batch_decode(outputs, skip_special_tokens=True)
86
+ predicted_titles = [decoded_output for decoded_output in decoded_outputs]
87
+ # predicted_titles = [nltk.sent_tokenize(decoded_output.strip())[0] for decoded_output in decoded_outputs]
88
 
89
  st.session_state.titles = predicted_titles
90