liuwei commited on
Commit
7b45115
1 Parent(s): fba6a03
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -40,7 +40,7 @@ def app():
40
 
41
  def transformer(source_text, sentences):
42
  #使用模型分别计算源字符串和对比字符串的embedding
43
- model = SentenceTransformer('sentence-transformers/paraphrase-MiniLM-L6-v2', device="cpu")
44
  source_emb = model.encode(source_text, convert_to_tensor=True)
45
  sent_embs = model.encode(sentences, convert_to_tensor=True)
46
  #计算源字符串和对比字符串embedding的cos值
 
40
 
41
  def transformer(source_text, sentences):
42
  #使用模型分别计算源字符串和对比字符串的embedding
43
+ model = SentenceTransformer('sentence-transformers/paraphrase-multilingual-MiniLM-L12-v2', device="cpu")
44
  source_emb = model.encode(source_text, convert_to_tensor=True)
45
  sent_embs = model.encode(sentences, convert_to_tensor=True)
46
  #计算源字符串和对比字符串embedding的cos值