nguyen1207 commited on
Commit
9141fcd
1 Parent(s): 8ea3a03

model outputs dict

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -24,7 +24,7 @@ if description and review:
24
  batch_dict = tokenizer(input_texts, max_length=512,
25
  padding=True, truncation=True, return_tensors='pt')
26
 
27
- query_embedding, doc_embedding = model(**batch_dict).pooler_output
28
 
29
  similarity = torch.nn.functional.cosine_similarity(
30
  query_embedding, doc_embedding)
 
24
  batch_dict = tokenizer(input_texts, max_length=512,
25
  padding=True, truncation=True, return_tensors='pt')
26
 
27
+ query_embedding, doc_embedding = model(**batch_dict, return_dict=True).pooler_output
28
 
29
  similarity = torch.nn.functional.cosine_similarity(
30
  query_embedding, doc_embedding)