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
|
@@ -98,6 +98,8 @@ predicted_labels = [model.config.id2label[label] for label in predicted_labels[0
|
|
| 98 |
|
| 99 |
# Print predicted labels
|
| 100 |
print(predicted_labels)
|
|
|
|
|
|
|
| 101 |
```
|
| 102 |
* **Option 2:** Load weights to a GeoLM model
|
| 103 |
|
|
|
|
| 98 |
|
| 99 |
# Print predicted labels
|
| 100 |
print(predicted_labels)
|
| 101 |
+
# ['O', 'B-Topo', 'O', 'O', 'O', 'O', 'O', 'B-Topo', 'O', 'O', 'O', 'O', 'O', 'O',
|
| 102 |
+
# 'O', 'O', 'B-Topo', 'O', 'O', 'O', 'O', 'O', 'B-Topo', 'I-Topo', 'I-Topo', 'O', 'O', 'O']
|
| 103 |
```
|
| 104 |
* **Option 2:** Load weights to a GeoLM model
|
| 105 |
|