File size: 566 Bytes
0dbd4be 16a7103 0dbd4be | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | ## A supervised finetune of the BirdMAE-Base model on XCL from BirdSet
```python
from transformers import AutoModelForSequenceClassification, AutoFeatureExtractor
fe = AutoFeatureExtractor.from_pretrained("DBD-research-group/BirdMAE-XCL", trust_remote_code=True) # "DBD-research-group/Bird-MAE-Base" also works
model = AutoModelForSequenceClassification.from_pretrained("DBD-research-group/BirdMAE-XCL", trust_remote_code=True, num_labels=9736)
print(model.config.id2label)
# {0: 'ostric2',
# 1: 'grerhe1',
# 2: 'lesrhe2',
# 3: 'sobkiw1',
# ...
# }
``` |