Instructions to use botryan96/GeoBERT_NER with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use botryan96/GeoBERT_NER with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="botryan96/GeoBERT_NER")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("botryan96/GeoBERT_NER") model = AutoModelForTokenClassification.from_pretrained("botryan96/GeoBERT_NER") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -57,4 +57,14 @@ from transformers import AutoTokenizer, AutoModelForTokenClassification
|
|
| 57 |
|
| 58 |
tokenizer = AutoTokenizer.from_pretrained("botryan96/GeoBERT_NER")
|
| 59 |
model = AutoModelForTokenClassification.from_pretrained("botryan96/GeoBERT_NER")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
```
|
|
|
|
| 57 |
|
| 58 |
tokenizer = AutoTokenizer.from_pretrained("botryan96/GeoBERT_NER")
|
| 59 |
model = AutoModelForTokenClassification.from_pretrained("botryan96/GeoBERT_NER")
|
| 60 |
+
|
| 61 |
+
#Define the pipeline
|
| 62 |
+
from transformers import pipeline
|
| 63 |
+
ner_machine = pipeline('ner',model = models,tokenizer=tokenizer, aggregation_strategy="simple")
|
| 64 |
+
|
| 65 |
+
#Define the sentence
|
| 66 |
+
sentence = 'In North America, the water storage in the seepage face model is higher than the base case because positive pore pressure is requisite for drainage through a seepage face boundary condition. The result from the resistivity data supports the notion, especially in the northern part of the Sandstone Sediment formation. The active formation of America has a big potential for Oil and Gas based on the seismic section, has been activated since the Paleozoic'
|
| 67 |
+
|
| 68 |
+
#Deploy the NER Machine
|
| 69 |
+
ner_machine(sentence)
|
| 70 |
```
|