Token Classification
Transformers
PyTorch
Safetensors
English
bert
toponym detection
language model
geospatial understanding
geolm
Instructions to use knowledge-computing/geolm-base-toponym-recognition with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use knowledge-computing/geolm-base-toponym-recognition with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="knowledge-computing/geolm-base-toponym-recognition")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("knowledge-computing/geolm-base-toponym-recognition") model = AutoModelForTokenClassification.from_pretrained("knowledge-computing/geolm-base-toponym-recognition") - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -83,7 +83,7 @@ model = AutoModelForTokenClassification.from_pretrained(model_name)
|
|
| 83 |
input_sentence = "Minneapolis, officially the City of Minneapolis, is a city in the state of Minnesota and the county seat of Hennepin County."
|
| 84 |
|
| 85 |
# Tokenize input sentence
|
| 86 |
-
tokens = tokenizer.encode(input_sentence,
|
| 87 |
|
| 88 |
# Pass tokens through the model
|
| 89 |
outputs = model(tokens)
|
|
|
|
| 83 |
input_sentence = "Minneapolis, officially the City of Minneapolis, is a city in the state of Minnesota and the county seat of Hennepin County."
|
| 84 |
|
| 85 |
# Tokenize input sentence
|
| 86 |
+
tokens = tokenizer.encode(input_sentence, return_tensors="pt")
|
| 87 |
|
| 88 |
# Pass tokens through the model
|
| 89 |
outputs = model(tokens)
|