Update README.md
Browse files
README.md
CHANGED
@@ -29,4 +29,9 @@ tags:
|
|
29 |
- `flaubert-oral-mixed` : trained from scratch on a mixed corpus of ASR and text data, BPE tokenizer is also trained on the same corpus
|
30 |
- `flaubert-oral-ft` : fine-tuning of flaubert-base-uncased for a few epochs on ASR data
|
31 |
|
32 |
-
|
|
|
|
|
|
|
|
|
|
|
|
29 |
- `flaubert-oral-mixed` : trained from scratch on a mixed corpus of ASR and text data, BPE tokenizer is also trained on the same corpus
|
30 |
- `flaubert-oral-ft` : fine-tuning of flaubert-base-uncased for a few epochs on ASR data
|
31 |
|
32 |
+
## Usage for sequence classification
|
33 |
+
```python
|
34 |
+
flaubert_tokenizer = FlaubertTokenizer.from_pretrained("nherve/flaubert-oral-asr")
|
35 |
+
flaubert_classif = FlaubertForSequenceClassification.from_pretrained("nherve/flaubert-oral-asr", num_labels=14)
|
36 |
+
flaubert_classif.sequence_summary.summary_type = 'mean'
|
37 |
+
```
|