Instructions to use DDSC/roberta-base-scandinavian with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use DDSC/roberta-base-scandinavian with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="DDSC/roberta-base-scandinavian")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("DDSC/roberta-base-scandinavian") model = AutoModelForMaskedLM.from_pretrained("DDSC/roberta-base-scandinavian", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Download src/utils.py from DDSC/roberta-base-scandinavian: direct link, hf CLI and curl.
- Browser
- Download file 167 Bytes
-
https://huggingface.co/DDSC/roberta-base-scandinavian/resolve/main/src/utils.py
- Command line
-
hf download hf://DDSC/roberta-base-scandinavian/src/utils.py
-
curl -L -o utils.py https://huggingface.co/DDSC/roberta-base-scandinavian/resolve/main/src/utils.py
167 Bytes
| '''Utility functions and variables used in other scripts''' | |
| from pathlib import Path | |
| root_dir = Path(__file__).parent.parent | |
| model_dir = '' # TODO: Needs to be set | |