Cyrile commited on
Commit
d9a8992
·
verified ·
1 Parent(s): 05e1d3f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -102,20 +102,20 @@ reranker = pipeline(
102
  similarity = reranker(
103
  [
104
  dict(
105
- text=ii, # the model was trained with context in `text` argument
106
  text_pair=query # and query in `text_pair` argument.
107
  )
108
- for ii in context_list
109
  ]
110
  )
111
- context_reranked = sorted(
112
  filter(
113
  lambda x: x[0]['label'] == "LABEL_1",
114
  zip(similarity, context_list)
115
  ),
116
  key=lambda x: x[0]
117
  )
118
- score, context_cleaned = zip(
119
  *filter(
120
  lambda x: x[0] >= 0.8
121
  )
 
102
  similarity = reranker(
103
  [
104
  dict(
105
+ text=context, # the model was trained with context in `text` argument
106
  text_pair=query # and query in `text_pair` argument.
107
  )
108
+ for context in contexts
109
  ]
110
  )
111
+ contexts_reranked = sorted(
112
  filter(
113
  lambda x: x[0]['label'] == "LABEL_1",
114
  zip(similarity, context_list)
115
  ),
116
  key=lambda x: x[0]
117
  )
118
+ score, contexts_cleaned = zip(
119
  *filter(
120
  lambda x: x[0] >= 0.8
121
  )