from transformers import pipeline

# Use the correct model name available on Hugging Face
model_name = "meta-llama/Meta-Llama-3.1-8B"

# Initialize the text-generation pipeline
pipe = pipeline("text-generation", model=model_name)

# Generate text based on a prompt
prompt = "In a distant future, humanity has developed AI"
output = pipe(prompt, max_length=50, num_return_sequences=1)

# Print the generated text
print(output)