Yasin Yousif commited on
Commit
c9c2e8c
·
1 Parent(s): c64789a
Files changed (1) hide show
  1. story.py +2 -1
story.py CHANGED
@@ -31,6 +31,7 @@ def story_model(preds,res_len=5):
31
  for word,prob in preds:
32
  dists += np.array([prob * (word in sent) for sent in All_sentenses])
33
 
34
- f_res = list(zip(dists,All_sentenses)).sort(key=lambda x:x[0])
 
35
 
36
  return [f for _,f in f_res[-res_len:]] # list of sentenses
 
31
  for word,prob in preds:
32
  dists += np.array([prob * (word in sent) for sent in All_sentenses])
33
 
34
+ f_res = list(zip(dists,All_sentenses))
35
+ f_res.sort(key=lambda x:x[0])
36
 
37
  return [f for _,f in f_res[-res_len:]] # list of sentenses