File size: 525 Bytes
6fc7e9b |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
!pip install transformers from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline, logging from huggingface_hub import notebook_login notebook_login() from transformers import AutoTokenizer, AutoModelForCausalLM, pipeline, logging # Ignore warnings logging.set_verbosity(logging.CRITICAL) # Load the model and tokenizer with authentication token model_name = "King-Harry/NinjaMasker-PII-Redaction" tokenizer = AutoTokenizer.from_pretrained(model_name) model = AutoModelForCausalLM.from_pretrained(model_name) |