Tirendaz commited on
Commit
f146ad8
1 Parent(s): 28739cc

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +12 -8
README.md CHANGED
@@ -35,19 +35,23 @@ It achieves the following results on the evaluation set:
35
  - Loss: 0.1343
36
  - F1: 0.8608
37
 
38
- ## Model description
39
 
40
- More information needed
41
 
42
- ## Intended uses & limitations
 
 
43
 
44
- More information needed
 
45
 
46
- ## Training and evaluation data
 
47
 
48
- More information needed
49
-
50
- ## Training procedure
51
 
52
  ### Training hyperparameters
53
 
 
35
  - Loss: 0.1343
36
  - F1: 0.8608
37
 
38
+ #### How to use
39
 
40
+ You can use this model with Transformers *pipeline* for NER.
41
 
42
+ ```python
43
+ from transformers import AutoTokenizer, AutoModelForTokenClassification
44
+ from transformers import pipeline
45
 
46
+ tokenizer = AutoTokenizer.from_pretrained("Tirendaz/roberta-base-NER")
47
+ model = AutoModelForTokenClassification.from_pretrained("Tirendaz/roberta-base-NER")
48
 
49
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
50
+ example = "My name is Wolfgang and I live in Berlin"
51
 
52
+ ner_results = nlp(example)
53
+ print(ner_results)
54
+ ```
55
 
56
  ### Training hyperparameters
57