Text Generation
Not-For-All-Audiences
File size: 268 Bytes
eaa1ed2
 
 
 
 
 
1
2
3
4
5
6
from transformers import AutoTokenizer, AutoModelForCausalLM

# Загрузка модели (замените 'gpt2' на нужную)
model_name = "gpt2"
tokenizer = AutoTokenizer.from_pretrained(model_name)
model = AutoModelForCausalLM.from_pretrained(model_name)