kalexa2 commited on
Commit
10e3c6e
1 Parent(s): ff25ac2

Update README.md

Browse files

added example usage

Files changed (1) hide show
  1. README.md +15 -0
README.md CHANGED
@@ -41,6 +41,21 @@ This is the model card of a 🤗 transformers model that has been pushed on the
41
 
42
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
44
  [More Information Needed]
45
 
46
  ### Downstream Use [optional]
 
41
 
42
  <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
43
 
44
+ ```
45
+ from transformers import AutoModelForTokenClassification, AutoTokenizer, pipeline
46
+ model = AutoModelForTokenClassification.from_pretrained('kalexa2/fabner-ner')
47
+ tokenizer = AutoTokenizer.from_pretrained('kalexa2/fabner-ner')
48
+ token_classifier = pipeline('ner',
49
+ model=model,
50
+ tokenizer=tokenizer,
51
+ aggregation_strategy="simple" )
52
+ r = token_classifier("Here, we report in-situ characterization of melt-flow dynamics in every location of the entire melt pool in laser metal additive manufacturing by populous and uniformly dispersed micro-tracers through in-situ high-resolution synchrotron x-ray imaging .")
53
+
54
+ for entity in r:
55
+ print(entity)
56
+ ```
57
+
58
+
59
  [More Information Needed]
60
 
61
  ### Downstream Use [optional]