EmicoBinsfinder commited on
Commit
5293e61
·
1 Parent(s): af3419a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -52,6 +52,7 @@ def broad_scope_class_predictor(class_embeddings, abstract_embedding, N=5, Sensi
52
  else:
53
  continue
54
  HighestSimilarity = predictions.nlargest(N, ['Score'])
 
55
 
56
  def sentence_embedder(sentences, model_path):
57
  tokenizer = AutoTokenizer.from_pretrained(model_path) #instantiating the sentence embedder using HuggingFace library
@@ -63,7 +64,7 @@ def sentence_embedder(sentences, model_path):
63
  sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']) #outputs a (1, 384) tensor representation of input text
64
  return sentence_embeddings
65
 
66
- return HighestSimilarity
67
 
68
  def add_text(history, text):
69
  history = history + [(text, None)]
 
52
  else:
53
  continue
54
  HighestSimilarity = predictions.nlargest(N, ['Score'])
55
+ return HighestSimilarity
56
 
57
  def sentence_embedder(sentences, model_path):
58
  tokenizer = AutoTokenizer.from_pretrained(model_path) #instantiating the sentence embedder using HuggingFace library
 
64
  sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']) #outputs a (1, 384) tensor representation of input text
65
  return sentence_embeddings
66
 
67
+
68
 
69
  def add_text(history, text):
70
  history = history + [(text, None)]