Llama-Ghanaba-AI / test.py
appohfaiths's picture
feat: implement llama v2 as base model
683ab32
raw
history blame contribute delete
337 Bytes
from transformers import pipeline
model_name = "appohfaiths/ghanabaai-model"
generator = pipeline("text-generation", model=model_name)
# Test it
question = "What is photosynthesis?"
result = generator(question, max_length=150, num_return_sequences=1, temperature=0.7, do_sample=True, truncation=True)
print(result[0]['generated_text'])