embedingHF commited on
Commit
3f5e61f
·
verified ·
1 Parent(s): eb6e465

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -3
README.md CHANGED
@@ -48,7 +48,7 @@ Then you can use the model like this:
48
  from sentence_transformers import SentenceTransformer
49
  sentences = ["This is an example sentence", "Each sentence is converted"]
50
 
51
- model = SentenceTransformer('sentence-transformers/Detector_model')
52
  embeddings = model.encode(sentences)
53
  print(embeddings)
54
  ```
@@ -72,8 +72,8 @@ def mean_pooling(model_output, attention_mask):
72
  sentences = ['This is an example sentence', 'Each sentence is converted']
73
 
74
  # Load model from HuggingFace Hub
75
- tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/Detector_model')
76
- model = AutoModel.from_pretrained('sentence-transformers/Detector_model')
77
 
78
  # Tokenize sentences
79
  encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
 
48
  from sentence_transformers import SentenceTransformer
49
  sentences = ["This is an example sentence", "Each sentence is converted"]
50
 
51
+ model = SentenceTransformer('embedingHF/Detector_model')
52
  embeddings = model.encode(sentences)
53
  print(embeddings)
54
  ```
 
72
  sentences = ['This is an example sentence', 'Each sentence is converted']
73
 
74
  # Load model from HuggingFace Hub
75
+ tokenizer = AutoTokenizer.from_pretrained('embedingHF/Detector_model')
76
+ model = AutoModel.from_pretrained('embedingHF/Detector_model')
77
 
78
  # Tokenize sentences
79
  encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')