ctrlbuzz commited on
Commit
e9bec17
1 Parent(s): 4d43185

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +7 -151
README.md CHANGED
@@ -29,163 +29,19 @@ This model is developed to tag Names, Organisations and addresses. I have used a
29
 
30
  ### Direct Use
31
 
32
- <!-- This section is for the model use without fine-tuning or plugging into a larger ecosystem/app. -->
 
33
 
34
- [More Information Needed]
35
 
36
- ### Downstream Use [optional]
37
 
38
- <!-- This section is for the model use when fine-tuned for a task, or when plugged into a larger ecosystem/app -->
39
 
40
- [More Information Needed]
41
 
42
- ### Out-of-Scope Use
43
 
44
- <!-- This section addresses misuse, malicious use, and uses that the model will not work well for. -->
45
 
46
- [More Information Needed]
47
-
48
- ## Bias, Risks, and Limitations
49
-
50
- <!-- This section is meant to convey both technical and sociotechnical limitations. -->
51
-
52
- [More Information Needed]
53
-
54
- ### Recommendations
55
-
56
- <!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
57
-
58
- Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
59
-
60
- ## How to Get Started with the Model
61
-
62
- Use the code below to get started with the model.
63
-
64
- [More Information Needed]
65
-
66
- ## Training Details
67
-
68
- ### Training Data
69
-
70
- <!-- This should link to a Data Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
71
-
72
- [More Information Needed]
73
-
74
- ### Training Procedure
75
-
76
- <!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
77
-
78
- #### Preprocessing [optional]
79
-
80
- [More Information Needed]
81
-
82
-
83
- #### Training Hyperparameters
84
-
85
- - **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
86
-
87
- #### Speeds, Sizes, Times [optional]
88
-
89
- <!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
90
-
91
- [More Information Needed]
92
-
93
- ## Evaluation
94
-
95
- <!-- This section describes the evaluation protocols and provides the results. -->
96
-
97
- ### Testing Data, Factors & Metrics
98
-
99
- #### Testing Data
100
-
101
- <!-- This should link to a Data Card if possible. -->
102
-
103
- [More Information Needed]
104
-
105
- #### Factors
106
-
107
- <!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
108
-
109
- [More Information Needed]
110
-
111
- #### Metrics
112
-
113
- <!-- These are the evaluation metrics being used, ideally with a description of why. -->
114
-
115
- [More Information Needed]
116
-
117
- ### Results
118
-
119
- [More Information Needed]
120
-
121
- #### Summary
122
-
123
-
124
-
125
- ## Model Examination [optional]
126
-
127
- <!-- Relevant interpretability work for the model goes here -->
128
-
129
- [More Information Needed]
130
-
131
- ## Environmental Impact
132
-
133
- <!-- Total emissions (in grams of CO2eq) and additional considerations, such as electricity usage, go here. Edit the suggested text below accordingly -->
134
-
135
- Carbon emissions can be estimated using the [Machine Learning Impact calculator](https://mlco2.github.io/impact#compute) presented in [Lacoste et al. (2019)](https://arxiv.org/abs/1910.09700).
136
-
137
- - **Hardware Type:** [More Information Needed]
138
- - **Hours used:** [More Information Needed]
139
- - **Cloud Provider:** [More Information Needed]
140
- - **Compute Region:** [More Information Needed]
141
- - **Carbon Emitted:** [More Information Needed]
142
-
143
- ## Technical Specifications [optional]
144
-
145
- ### Model Architecture and Objective
146
-
147
- [More Information Needed]
148
-
149
- ### Compute Infrastructure
150
-
151
- [More Information Needed]
152
-
153
- #### Hardware
154
-
155
- [More Information Needed]
156
-
157
- #### Software
158
-
159
- [More Information Needed]
160
-
161
- ## Citation [optional]
162
-
163
- <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
164
-
165
- **BibTeX:**
166
-
167
- [More Information Needed]
168
-
169
- **APA:**
170
-
171
- [More Information Needed]
172
-
173
- ## Glossary [optional]
174
-
175
- <!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
176
-
177
- [More Information Needed]
178
-
179
- ## More Information [optional]
180
-
181
- [More Information Needed]
182
-
183
- ## Model Card Authors [optional]
184
-
185
- [More Information Needed]
186
-
187
- ## Model Card Contact
188
-
189
- [More Information Needed]
190
 
191
 
 
29
 
30
  ### Direct Use
31
 
32
+ from transformers import BertTokenizer, AutoModelForTokenClassification
33
+ from transformers import pipeline
34
 
35
+ tokenizer = BertTokenizer.from_pretrained('bert-base-cased')
36
 
37
+ model = AutoModelForTokenClassification.from_pretrained("ctrlbuzz/bert-addresses")
38
 
39
+ nlp = pipeline("ner", model=model, tokenizer=tokenizer)
40
 
41
+ example = "While Maria was representing Johnson & Associates at a conference in Spain, she mailed me a letter from her new office at 123 Elm St., Apt. 4B, Springfield, IL.",
42
 
43
+ print(nlp(example))
44
 
 
45
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
46
 
47