Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available:
5.44.1
metadata
title: Gifty Plus
emoji: π
colorFrom: green
colorTo: pink
sdk: gradio
sdk_version: 5.42.0
app_file: app.py
pinned: false
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
A hybrid gift recommender (catalog + DIY + personalized message).
Tip: If your hardware allows, switch text/rerank models to larger ones via Space Variables for better quality.
Hardware
- CPU Basic: works out of the box (default models in
app.py
) - CPU Upgrade: faster embeddings & generation
- GPU (T4/A10G): recommended for larger FLAN models and stronger rerankers
Model knobs (set in Settings β Variables & secrets β Space variables)
You can override these without editing code:
EMBED_MODEL_ID
- CPU OK (default):
sentence-transformers/all-MiniLM-L12-v2
- Better (slower, still CPU OK):
sentence-transformers/all-mpnet-base-v2
- CPU OK (default):
DIY_MODEL_ID
(FLAN for the DIY section)- CPU:
google/flan-t5-small
orgoogle/flan-t5-base
- GPU:
google/flan-t5-large
(noticeably better)
- CPU:
MSG_MODEL_ID
(personalized message)- CPU:
google/flan-t5-base
- GPU:
google/flan-t5-large
- Keeps diversity via stochastic sampling + validators.
- CPU:
RERANK_MODEL_ID
(optional cross-encoder re-ranker)- CPU:
cross-encoder/ms-marco-MiniLM-L-6-v2
- GPU:
cross-encoder/ms-marco-MiniLM-L-12-v2
orBAAI/bge-reranker-base
- CPU:
Notes
- Age/Gender are filters only (not weighted) β avoid mismatches (e.g., kidsβ items for adults).
- Interests and Occasion are given stronger weight in ranking.
- The message generator is non-generic: uses randomized temperatures/top-p with validators and anti-duplication.