Nbeau commited on
Commit
a1ee9fe
1 Parent(s): 6adec45

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +4 -4
README.md CHANGED
@@ -15,13 +15,13 @@ base_model:
15
  ```python
16
  from transformers import RobertaForMaskedLM, RobertaTokenizer
17
 
18
- # Load the pre-trained codeBERT model and tokenizer
19
- model = RobertaForMaskedLM.from_pretrained("microsoft/codebert-base")
20
- tokenizer = RobertaTokenizer.from_pretrained("microsoft/codebert-base")
21
 
22
  # Example of tokenizing a code snippet
23
  code_snippet = "def enumerate_items(items):"
24
- derivation_sequence = ast2seq(code_snippet) # ast2seq implementation available https://github.com/NathanaelBeau/grammarBERT/
25
  input_ids = tokenizer.encode(code_snippet, return_tensors='pt')
26
 
27
  # Predict masked tokens or fine-tune the model as needed
 
15
  ```python
16
  from transformers import RobertaForMaskedLM, RobertaTokenizer
17
 
18
+ # Load the pre-trained grammarBERT model and tokenizer
19
+ model = RobertaForMaskedLM.from_pretrained("Nbeau/grammarBERT")
20
+ tokenizer = RobertaTokenizer.from_pretrained("Nbeau/grammarBERT")
21
 
22
  # Example of tokenizing a code snippet
23
  code_snippet = "def enumerate_items(items):"
24
+ derivation_sequence = ast2seq(code_snippet) # ast2seq implementation available https://github.com/NathanaelBeau/grammarBERT/asdl/
25
  input_ids = tokenizer.encode(code_snippet, return_tensors='pt')
26
 
27
  # Predict masked tokens or fine-tune the model as needed