Gifty_Plus / README.md
Danielos100's picture
Update README.md
78a8d31 verified

A newer version of the Gradio SDK is available: 5.44.1

Upgrade
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
  • DIY_MODEL_ID (FLAN for the DIY section)

    • CPU: google/flan-t5-small or google/flan-t5-base
    • GPU: google/flan-t5-large (noticeably better)
  • MSG_MODEL_ID (personalized message)

    • CPU: google/flan-t5-base
    • GPU: google/flan-t5-large
    • Keeps diversity via stochastic sampling + validators.
  • 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 or BAAI/bge-reranker-base

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.