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