Firqa Aqila Noor A
commited on
Commit
•
b2e2ddc
1
Parent(s):
0c6f9cd
Update README.md
Browse files
README.md
CHANGED
@@ -26,9 +26,9 @@ Then you can use the model like this:
|
|
26 |
|
27 |
```python
|
28 |
from sentence_transformers import SentenceTransformer
|
29 |
-
sentences = ["
|
30 |
|
31 |
-
model = SentenceTransformer('
|
32 |
embeddings = model.encode(sentences)
|
33 |
print(embeddings)
|
34 |
```
|
@@ -51,11 +51,12 @@ def mean_pooling(model_output, attention_mask):
|
|
51 |
|
52 |
|
53 |
# Sentences we want sentence embeddings for
|
54 |
-
sentences = [
|
|
|
55 |
|
56 |
# Load model from HuggingFace Hub
|
57 |
-
tokenizer = AutoTokenizer.from_pretrained('
|
58 |
-
model = AutoModel.from_pretrained('
|
59 |
|
60 |
# Tokenize sentences
|
61 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
|
|
26 |
|
27 |
```python
|
28 |
from sentence_transformers import SentenceTransformer
|
29 |
+
sentences = ["Ibukota Perancis adalah Paris", "Menara Eifel terletak di Paris, Perancis", "Pizza adalah makanan khas Italia", "Saya kuliah di Carneige Melon University"]
|
30 |
|
31 |
+
model = SentenceTransformer('firqaaa/indo-sbert-finetuned-snli-mnli-id')
|
32 |
embeddings = model.encode(sentences)
|
33 |
print(embeddings)
|
34 |
```
|
|
|
51 |
|
52 |
|
53 |
# Sentences we want sentence embeddings for
|
54 |
+
sentences = ["Ibukota Perancis adalah Paris", "Menara Eifel terletak di Paris, Perancis", "Pizza adalah makanan khas Italia", "Saya kuliah di Carneige Melon University"]
|
55 |
+
|
56 |
|
57 |
# Load model from HuggingFace Hub
|
58 |
+
tokenizer = AutoTokenizer.from_pretrained('firqaaa/indo-sbert-finetuned-snli-mnli-id')
|
59 |
+
model = AutoModel.from_pretrained('firqaaa/indo-sbert-finetuned-snli-mnli-id')
|
60 |
|
61 |
# Tokenize sentences
|
62 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|