mistreal / app.py
Kathirsci's picture
Update app.py
91f145c verified
raw
history blame contribute delete
426 Bytes
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)