test / app.py
haniyehhh's picture
Create app.py
b7c45c7 verified
Raw History Blame Contribute Delete
345 Bytes
from transformers import pipeline
generator = pipeline(
"text-generation",
model="CohereLabs/tiny-aya-base",
torch_dtype="bfloat16",
)
output = generator(
"The capital of Spain is",
max_new_tokens=128,
do_sample=True,
temperature=0.1,
top_p=0.9,
repetition_penalty=1.1,
)
print(output[0]["generated_text"])