Update README.md
Browse files
README.md
CHANGED
@@ -48,10 +48,10 @@ code_snippet = "your code to embed here"
|
|
48 |
sentence = f"{tokenizer.sep_token}{instruction_code}{tokenizer.sep_token}{code_snippet)}{tokenizer.cls_token}"
|
49 |
|
50 |
#Tokenizing your sentence
|
51 |
-
|
52 |
|
53 |
#Embedding the tokenized sentence
|
54 |
-
embedded_sentence = model(**
|
55 |
```
|
56 |
|
57 |
You will get as an output three elements:
|
|
|
48 |
sentence = f"{tokenizer.sep_token}{instruction_code}{tokenizer.sep_token}{code_snippet)}{tokenizer.cls_token}"
|
49 |
|
50 |
#Tokenizing your sentence
|
51 |
+
tokenized_sentence = tokenizer(sentence, return_tensors="pt",truncation=True, max_length=2048)
|
52 |
|
53 |
#Embedding the tokenized sentence
|
54 |
+
embedded_sentence = model(**tokenized_sentence)
|
55 |
```
|
56 |
|
57 |
You will get as an output three elements:
|