YAML Metadata
Warning:
The pipeline tag "text2text-generation" is not in the official list: text-classification, token-classification, table-question-answering, question-answering, zero-shot-classification, translation, summarization, feature-extraction, text-generation, fill-mask, sentence-similarity, text-to-speech, text-to-audio, automatic-speech-recognition, audio-to-audio, audio-classification, audio-text-to-text, voice-activity-detection, depth-estimation, image-classification, object-detection, image-segmentation, text-to-image, image-to-text, image-to-image, image-to-video, unconditional-image-generation, video-classification, reinforcement-learning, robotics, tabular-classification, tabular-regression, tabular-to-text, table-to-text, multiple-choice, text-ranking, text-retrieval, time-series-forecasting, text-to-video, image-text-to-text, visual-question-answering, document-question-answering, zero-shot-image-classification, graph-ml, mask-generation, zero-shot-object-detection, text-to-3d, image-to-3d, image-feature-extraction, video-text-to-text, keypoint-detection, visual-document-retrieval, any-to-any, video-to-video, other
Pinterest Personality Keywords Generator
🎨 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.
🚀 Quick Start
Using Transformers Pipeline
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'])
Using Direct Model Loading
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)
📝 Input Format
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
Required Fields:
- PERSONALITY_NAME: Name of the person
- Culture: Cultural background or nationality
- Role: Profession, title, or main role
- Period: Historical time period
- Bio: (Optional) Brief biography
🎯 Example Outputs
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" |
⚙️ Generation Parameters
The model is optimized with these generation settings:
- max_length: 300
- num_beams: 8
- temperature: 0.9
- top_p: 0.95
- repetition_penalty: 2.0
- length_penalty: 1.2
- no_repeat_ngram_size: 2
🔧 Technical Details
- Base Model: google/flan-t5-base
- Fine-tuning Method: LoRA (Low-Rank Adaptation)
- LoRA Rank: 16
- Target Modules: ["q", "v", "k", "o", "wi", "wo"]
- Training Data: Historical and fictional personalities dataset
- Task: Seq2Seq text generation
📊 Model Performance
The model has been optimized for:
- ✅ Visual Keywords: Generates terms that work well for image searches
- ✅ Pinterest Optimization: Keywords tailored for Pinterest's search algorithm
- ✅ Cultural Sensitivity: Respects cultural context and historical accuracy
- ✅ Diversity: Produces varied and creative keyword combinations
🚫 Limitations
- Specifically designed for Pinterest keyword generation
- May not perform well on other text generation tasks
- Limited to personalities with sufficient historical/cultural context
- Requires specific input format for optimal results
- Downloads last month
- 14
Inference Providers
NEW
This model isn't deployed by any Inference Provider.
🙋
Ask for provider support
Model tree for Amama02/pinterest-personality-keywords-v4
Base model
google/flan-t5-base