Bagi4 commited on
Commit
3bdc77f
1 Parent(s): f791980

feat: new model

Browse files
Files changed (2) hide show
  1. main.py +2 -2
  2. models/all-MiniLM-L6-v2 +1 -0
main.py CHANGED
@@ -24,8 +24,8 @@ def mean_pooling(model_output, attention_mask):
24
  return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
25
 
26
 
27
- tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/all-MiniLM-L6-v2')
28
- model = AutoModel.from_pretrained('sentence-transformers/all-MiniLM-L6-v2')
29
 
30
  app = FastAPI()
31
 
 
24
  return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
25
 
26
 
27
+ tokenizer = AutoTokenizer.from_pretrained('models/all-MiniLM-L6-v2')
28
+ model = AutoModel.from_pretrained('models/all-MiniLM-L6-v2')
29
 
30
  app = FastAPI()
31
 
models/all-MiniLM-L6-v2 ADDED
@@ -0,0 +1 @@
 
 
1
+ Subproject commit 7dbbc90392e2f80f3d3c277d6e90027e55de9125