python
Copy code
from transformers import pipeline
# Load a pre-trained model from Hugging Face
model_name = "gpt-3"
nlp_pipeline = pipeline("text-generation", model=model_name)
# Generate text
prompt = "Once upon a time"
generated_text = nlp_pipeline(prompt, max_length=50)
print(generated_text)