Spaces:
Build error
Build error
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,4 +11,41 @@ license: apache-2.0
|
|
| 11 |
short_description: Multimodal RAG to augment english recipes searches
|
| 12 |
---
|
| 13 |
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 11 |
short_description: Multimodal RAG to augment english recipes searches
|
| 12 |
---
|
| 13 |
|
| 14 |
+
# Multimodal Retrieval System with FAISS
|
| 15 |
+
|
| 16 |
+
This repository contains a prototype system for multimodal information retrieval using FAISS, capable of searching across text and images using vector similarity.
|
| 17 |
+
|
| 18 |
+
## Structure
|
| 19 |
+
|
| 20 |
+
- `notebook/` (or `.ipynb`): Contains the logic to generate the vector indexes for both text and images.
|
| 21 |
+
- `app.py`: Gradio-based interface for interacting with the system.
|
| 22 |
+
- `search_ocean.py`: Core logic for performing FAISS-based similarity search using precomputed indexes.
|
| 23 |
+
- `text_index.faiss`, `image_index.faiss`: The FAISS index files generated by the notebook (already included in the app).
|
| 24 |
+
- `metadata_text.json`, `metadata_image.json`: Associated metadata for mapping index results back to source information.
|
| 25 |
+
|
| 26 |
+
## What it does
|
| 27 |
+
|
| 28 |
+
- Loads precomputed FAISS indexes (for text and image).
|
| 29 |
+
- Performs retrieval based on a text or image query.
|
| 30 |
+
- Returns top matching results using cosine similarity.
|
| 31 |
+
|
| 32 |
+
## What it doesn't (yet) do
|
| 33 |
+
|
| 34 |
+
- No generation step (e.g., using LLMs) is implemented in this app.
|
| 35 |
+
- While the code for image retrieval is ready, image indexes must be built in the notebook beforehand.
|
| 36 |
+
- There is **no context overlap** implemented when chunking the data for indexing. Each chunk is indexed independently, which may affect the quality of retrieval in some use cases.
|
| 37 |
+
|
| 38 |
+
## Dependencies
|
| 39 |
+
|
| 40 |
+
- `faiss-cpu`
|
| 41 |
+
- `sentence-transformers`
|
| 42 |
+
- `openai-clip`
|
| 43 |
+
- `torch`
|
| 44 |
+
- `torchvision`
|
| 45 |
+
- `gradio`
|
| 46 |
+
- `Pillow`
|
| 47 |
+
|
| 48 |
+
## Notes
|
| 49 |
+
|
| 50 |
+
- The app is designed to separate concerns between indexing (offline, notebook) and retrieval (live, Gradio app).
|
| 51 |
+
- You can easily extend this to include LLM generation or contextual QA once relevant results are retrieved.
|