nickprock commited on
Commit
1485fbc
1 Parent(s): 358b8f9

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +16 -15
README.md CHANGED
@@ -5,10 +5,15 @@ tags:
5
  - feature-extraction
6
  - sentence-similarity
7
  - transformers
8
-
 
 
 
 
 
9
  ---
10
 
11
- # {MODEL_NAME}
12
 
13
  This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
14
 
@@ -26,11 +31,12 @@ Then you can use the model like this:
26
 
27
  ```python
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
  ```
35
 
36
 
@@ -51,11 +57,11 @@ def mean_pooling(model_output, attention_mask):
51
 
52
 
53
  # Sentences we want sentence embeddings for
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')
@@ -69,15 +75,14 @@ sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask']
69
 
70
  print("Sentence embeddings:")
71
  print(sentence_embeddings)
72
- ```
73
-
74
 
 
75
 
76
  ## Evaluation Results
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
@@ -119,8 +124,4 @@ SentenceTransformer(
119
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
120
  (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
121
  )
122
- ```
123
-
124
- ## Citing & Authors
125
-
126
- <!--- Describe where people can find more information -->
 
5
  - feature-extraction
6
  - sentence-similarity
7
  - transformers
8
+ license: mit
9
+ datasets:
10
+ - stsb_multi_mt
11
+ language:
12
+ - it
13
+ library_name: sentence-transformers
14
  ---
15
 
16
+ # sentence-bert-base-italian-uncased
17
 
18
  This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
19
 
 
31
 
32
  ```python
33
  from sentence_transformers import SentenceTransformer
34
+ sentences = ["Una ragazza si acconcia i capelli.", "Una ragazza si sta spazzolando i capelli."]
35
 
36
+ model = SentenceTransformer('nickprock/sentence-bert-base-italian-uncased')
37
  embeddings = model.encode(sentences)
38
  print(embeddings)
39
+
40
  ```
41
 
42
 
 
57
 
58
 
59
  # Sentences we want sentence embeddings for
60
+ sentences = ['Una ragazza si acconcia i capelli.', 'Una ragazza si sta spazzolando i capelli.']
61
 
62
  # Load model from HuggingFace Hub
63
+ tokenizer = AutoTokenizer.from_pretrained('nickprock/sentence-bert-base-italian-uncased')
64
+ model = AutoModel.from_pretrained('nickprock/sentence-bert-base-italian-uncased')
65
 
66
  # Tokenize sentences
67
  encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
 
75
 
76
  print("Sentence embeddings:")
77
  print(sentence_embeddings)
 
 
78
 
79
+ ```
80
 
81
  ## Evaluation Results
82
 
83
  <!--- Describe how your model was evaluated -->
84
 
85
+ For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name=nickprock/sentence-bert-base-italian-uncased)
86
 
87
 
88
  ## Training
 
124
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
125
  (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
126
  )
127
+ ```