SeeknnDestroy commited on
Commit
c7d4813
·
unverified ·
1 Parent(s): 9003466

minor fix1

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -166,8 +166,8 @@ def get_confidence_color(confidence):
166
  def generate_gte_embedding(text, model_name='Alibaba-NLP/gte-multilingual-base'):
167
  """Generate GTE embeddings for a single text."""
168
  start_time = time.time()
169
- tokenizer = AutoTokenizer.from_pretrained(model_name)
170
- model = AutoModel.from_pretrained(model_name)
171
 
172
  # Tokenize and generate embedding
173
  inputs = tokenizer(text, padding=True, truncation=True, return_tensors="pt")
 
166
  def generate_gte_embedding(text, model_name='Alibaba-NLP/gte-multilingual-base'):
167
  """Generate GTE embeddings for a single text."""
168
  start_time = time.time()
169
+ tokenizer = AutoTokenizer.from_pretrained(model_name, trust_remote_code=True)
170
+ model = AutoModel.from_pretrained(model_name, trust_remote_code=True)
171
 
172
  # Tokenize and generate embedding
173
  inputs = tokenizer(text, padding=True, truncation=True, return_tensors="pt")