!pip install transformers

from transformers import pipeline

Download the model

model_name = "hf/0522" nlp = pipeline("text-generation", model=model_name, tokenizer=model_name)

Generate text

text = nlp("Hello, how are you?") print(text)