Token Classification
Transformers
PyTorch
TensorBoard
French
flaubert
bert
natural language understanding
NLU
spoken language understanding
SLU
understanding
MEDIA
Instructions to use vpelloin/MEDIA_NLU-flaubert_base_uncased with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use vpelloin/MEDIA_NLU-flaubert_base_uncased with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("token-classification", model="vpelloin/MEDIA_NLU-flaubert_base_uncased")# Load model directly from transformers import AutoTokenizer, AutoModelForTokenClassification tokenizer = AutoTokenizer.from_pretrained("vpelloin/MEDIA_NLU-flaubert_base_uncased") model = AutoModelForTokenClassification.from_pretrained("vpelloin/MEDIA_NLU-flaubert_base_uncased", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -71,10 +71,10 @@ sentences = [
|
|
| 71 |
"dans un hôtel avec piscine à marseille"
|
| 72 |
]
|
| 73 |
inputs = tokenizer(sentences, padding=True, return_tensors='pt')
|
| 74 |
-
|
| 75 |
print([
|
| 76 |
[model.config.id2label[i] for i in b]
|
| 77 |
-
for b in
|
| 78 |
])
|
| 79 |
```
|
| 80 |
|
|
|
|
| 71 |
"dans un hôtel avec piscine à marseille"
|
| 72 |
]
|
| 73 |
inputs = tokenizer(sentences, padding=True, return_tensors='pt')
|
| 74 |
+
outputs = model(**inputs).logits
|
| 75 |
print([
|
| 76 |
[model.config.id2label[i] for i in b]
|
| 77 |
+
for b in outputs.argmax(dim=-1).tolist()
|
| 78 |
])
|
| 79 |
```
|
| 80 |
|