AjayP13 commited on
Commit
3545246
·
verified ·
1 Parent(s): 051330e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -49,7 +49,7 @@ def get_luar_embeddings(texts_batch):
49
  def compute_mis(texts, target_texts_batch):
50
  a_texts = list(itertools.chain.from_iterable([[t] * len(target_texts) for t, target_texts in zip(texts, target_texts_batch)]))
51
  b_texts = list(itertools.chain.from_iterable(target_texts_batch))
52
- scores = mis.compute(a_texts, b_texts, batch_size=len(a_texts))
53
  for idx, (score, a_text, b_text) in enumerate(zip(scores, a_texts, b_texts)):
54
  if a_text == b_text:
55
  scores[idx] = 1.0
 
49
  def compute_mis(texts, target_texts_batch):
50
  a_texts = list(itertools.chain.from_iterable([[t] * len(target_texts) for t, target_texts in zip(texts, target_texts_batch)]))
51
  b_texts = list(itertools.chain.from_iterable(target_texts_batch))
52
+ scores = mis_model.compute(a_texts, b_texts, batch_size=len(a_texts))
53
  for idx, (score, a_text, b_text) in enumerate(zip(scores, a_texts, b_texts)):
54
  if a_text == b_text:
55
  scores[idx] = 1.0