Spaces:
Runtime error
Runtime error
Download test.py from bacngv/roberta-ner: direct link, hf CLI and curl.
- Browser
- Download file 281 Bytes
-
https://huggingface.co/spaces/bacngv/roberta-ner/resolve/main/test.py
- Command line
-
hf download hf://spaces/bacngv/roberta-ner/test.py
-
curl -L -o test.py https://huggingface.co/spaces/bacngv/roberta-ner/resolve/main/test.py
281 Bytes
| from xlmr_for_token_classification import XLMRForTokenClassification | |
| from collections import namedtuple | |
| Config = namedtuple('config', ['pretrained_path', 'n_labels', 'hidden_size']) | |
| config = Config('pretrained_models/xlmr.base', 5, 768) | |
| model = XLMRForTokenClassification(config) |