Downloads · 30 days
12
10% of all-time downloads
Amama02/pinterest-personality-keywords-v4
pinterest-personality-keywords-v4 is a text generation model from Amama02. Use it when you need the model to write or continue text. It is set up for transformers. The card lists the license as apache-2.0.
🎨 Fine-tuned FLAN-T5 model for generating Pinterest-optimized keywords for historical and fictional personalities.
Downloads · 30 days
12
10% of all-time downloads
All-time downloads
121
Public
Parameters
248M
571 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors571 MB · 99%
How the weights are stored.
F16210M · 85%
From the Hugging Face model README
🎨 Fine-tuned FLAN-T5 model for generating Pinterest-optimized keywords for historical and fictional personalities.
This model was fine-tuned using LoRA (Low-Rank Adaptation) to generate visually appealing, searchable Pinterest keywords based on personality information.
from transformers import pipeline
# Load the model
generator = pipeline("text2text-generation", model="Amama02/pinterest-personality-keywords-v4")
# Generate keywords
input_text = "Generate Pinterest keywords for Marie Curie - Culture: Polish-French | Role: Scientist | Period: Early 20th Century - Keywords should be visual, searchable on Pinterest, and capture their aesthetic essence. The Culture, Role, Period and bio give important information about the personality. Take them into account when generating keywords"
result = generator(
input_text,
max_length=300,
num_beams=8,
temperature=0.9,
do_sample=True,
top_p=0.95,
repetition_penalty=2.0,
length_penalty=1.2,
no_repeat_ngram_size=2
)
print(result[0]['generated_text'])
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
# Load model and tokenizer
tokenizer = AutoTokenizer.from_pretrained("Amama02/pinterest-personality-keywords-v4")
model = AutoModelForSeq2SeqLM.from_pretrained("Amama02/pinterest-personality-keywords-v4")
# Prepare input
input_text = "Generate Pinterest keywords for Frida Kahlo - Culture: Mexican | Role: Artist | Period: 20th Century - Keywords should be visual, searchable on Pinterest, and capture their aesthetic essence. The Culture, Role, Period and bio give important information about the personality. Take them into account when generating keywords"
# Tokenize and generate
inputs = tokenizer(input_text, return_tensors="pt", max_length=256, truncation=True)
outputs = model.generate(
**inputs,
max_length=300,
num_beams=8,
temperature=0.9,
do_sample=True,
top_p=0.95,
repetition_penalty=2.0,
length_penalty=1.2,
early_stopping=True,
no_repeat_ngram_size=2
)
keywords = tokenizer.decode(outputs[0], skip_special_tokens=True)
print(keywords)
The model expects input in this specific format:
Generate Pinterest keywords for [PERSONALITY_NAME] - Culture: [CULTURE] | Role: [ROLE] | Period: [TIME_PERIOD] | Bio: [BIOGRAPHY] - Keywords should be visual, searchable on Pinterest, and capture their aesthetic essence. The Culture, Role, Period and bio give important information about the personality. Take them into account when generating keywords
| Input | Generated Keywords |
|---|---|
| Cleopatra (Egyptian Royalty, Ancient Egypt) | "Egyptian queen aesthetic, ancient Egypt fashion, Cleopatra makeup, pharaoh style, golden jewelry, Egyptian mythology, ancient beauty, royal Egyptian, hieroglyphics, Egyptian art" |
| Leonardo da Vinci (Italian Polymath, Renaissance) | "Renaissance art, Italian genius, classical paintings, Renaissance fashion, vintage sketches, Italian Renaissance, Renaissance architecture, classical art history" |
| Marie Curie (Polish-French Scientist, Early 20th Century) | "vintage science, female scientist aesthetic, laboratory vintage, early 1900s fashion, women in science, vintage academic, scientific discovery, vintage portraits" |
The model is optimized with these generation settings:
The model has been optimized for: