tomaarsen HF Staff commited on
Commit
da8410f
·
1 Parent(s): 172af8b

Add language; replace {MODEL_NAME} with myzens/turemb_512

Browse files

Hello!

This is awesome! In this PR I propose the following:
* Specify the language metadata, this allows users to find your model if they filter for Turkish models.
* Replace "{MODEL_NAME}" with "myzens/turemb_512", this should make the snippets copy-paste ready.

- Tom Aarsen

Files changed (1) hide show
  1. README.md +7 -7
README.md CHANGED
@@ -5,7 +5,8 @@ tags:
5
  - feature-extraction
6
  - sentence-similarity
7
  - transformers
8
-
 
9
  ---
10
 
11
  # turemb_512
@@ -28,7 +29,7 @@ Then you can use the model like this:
28
  from sentence_transformers import SentenceTransformer
29
  sentences = ["This is an example sentence", "Each sentence is converted"]
30
 
31
- model = SentenceTransformer('{MODEL_NAME}')
32
  embeddings = model.encode(sentences)
33
  print(embeddings)
34
  ```
@@ -54,8 +55,8 @@ def mean_pooling(model_output, attention_mask):
54
  sentences = ['This is an example sentence', 'Each sentence is converted']
55
 
56
  # Load model from HuggingFace Hub
57
- tokenizer = AutoTokenizer.from_pretrained('{MODEL_NAME}')
58
- model = AutoModel.from_pretrained('{MODEL_NAME}')
59
 
60
  # Tokenize sentences
61
  encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
@@ -77,7 +78,7 @@ print(sentence_embeddings)
77
 
78
  <!--- Describe how your model was evaluated -->
79
 
80
- For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
81
 
82
 
83
  ## Training
@@ -160,5 +161,4 @@ SentenceTransformer(
160
  journal={IEEE Sinyal Isleme ve Iletisim Uygulamalar{\i} Kurultay{\i} (SIU 2016)},
161
  year={2016}
162
  }
163
- ```
164
-
 
5
  - feature-extraction
6
  - sentence-similarity
7
  - transformers
8
+ language:
9
+ - tr
10
  ---
11
 
12
  # turemb_512
 
29
  from sentence_transformers import SentenceTransformer
30
  sentences = ["This is an example sentence", "Each sentence is converted"]
31
 
32
+ model = SentenceTransformer('myzens/turemb_512')
33
  embeddings = model.encode(sentences)
34
  print(embeddings)
35
  ```
 
55
  sentences = ['This is an example sentence', 'Each sentence is converted']
56
 
57
  # Load model from HuggingFace Hub
58
+ tokenizer = AutoTokenizer.from_pretrained('myzens/turemb_512')
59
+ model = AutoModel.from_pretrained('myzens/turemb_512')
60
 
61
  # Tokenize sentences
62
  encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
 
78
 
79
  <!--- Describe how your model was evaluated -->
80
 
81
+ For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=myzens/turemb_512)
82
 
83
 
84
  ## Training
 
161
  journal={IEEE Sinyal Isleme ve Iletisim Uygulamalar{\i} Kurultay{\i} (SIU 2016)},
162
  year={2016}
163
  }
164
+ ```