Views
No views yet
transformers with safe_serialization=True.1from transformers import AutoTokenizer, AutoModel
2
3repo\_id = "your-username/legal-bert-base-uncased-safetensors"
4
5tokenizer = AutoTokenizer.from\_pretrained(repo\_id)
6model = AutoModel.from\_pretrained(repo\_id)
7
8inputs = tokenizer("The court finds the defendant guilty.", return\_tensors="pt")
9outputs = model(\*\*inputs).bin version of the model.1@article{chalkidis2020legal,
2title={LEGAL-BERT: The Muppets straight out of Law School},
3author={Chalkidis, Ilias and Fergadiotis, Manos and Malakasiotis, Prodromos and Aletras, Nikolaos and Androutsopoulos, Ion},
4journal={arXiv preprint arXiv:2010.02559},
5year={2020}
6}