Spaces:
Sleeping
Sleeping
A newer version of the Gradio SDK is available: 6.13.0
metadata
title: RAG Khidmat (Persistent Index)
emoji: 🧠
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 4.44.0
app_file: app.py
pinned: false
RAG Khidmat — Hugging Face Space (Persistent Index)
Same as before, but now the FAISS index is saved to disk and auto-loaded on startup.
How it works
- After you click Build index (save), the app writes the index to the
INDEX_DIR(default:faiss_index/). - On app startup or when you click Load saved index, it attempts to load the saved index using the same embeddings model.
- If you upload a new PDF and rebuild, the old index folder is overwritten (by default).
Environment variables
INDEX_DIR(default:faiss_index)EMBEDDINGS_MODEL(default:mixedbread-ai/mxbai-embed-large-v1)GENERATION_MODEL(default:google/flan-t5-base)HF_TOKEN(secret, only if needed)MAX_NEW_TOKENS(default: 256)TEMPERATURE(default: 0.2)