Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,8 +12,7 @@ import google.generativeai as genai
|
|
| 12 |
from functools import lru_cache
|
| 13 |
from tenacity import retry, stop_after_attempt, wait_exponential
|
| 14 |
from langchain_community.retrievers import BM25Retriever
|
| 15 |
-
from langchain_community.vectorstores import
|
| 16 |
-
FAISS
|
| 17 |
from langchain_core.embeddings import Embeddings
|
| 18 |
from langchain_core.documents import Document
|
| 19 |
from collections import defaultdict
|
|
@@ -26,6 +25,7 @@ load_dotenv()
|
|
| 26 |
# --- Configuration ---
|
| 27 |
FAISS_INDEX_PATH = "faiss_index"
|
| 28 |
BM25_INDEX_PATH = "bm25_index.pkl"
|
|
|
|
| 29 |
CACHE_VERSION = "v1"
|
| 30 |
embedding_model = "e5-mistral-7b-instruct"
|
| 31 |
generation_model = "gemini-1.5-flash"
|
|
|
|
| 12 |
from functools import lru_cache
|
| 13 |
from tenacity import retry, stop_after_attempt, wait_exponential
|
| 14 |
from langchain_community.retrievers import BM25Retriever
|
| 15 |
+
from langchain_community.vectorstores import FAISS
|
|
|
|
| 16 |
from langchain_core.embeddings import Embeddings
|
| 17 |
from langchain_core.documents import Document
|
| 18 |
from collections import defaultdict
|
|
|
|
| 25 |
# --- Configuration ---
|
| 26 |
FAISS_INDEX_PATH = "faiss_index"
|
| 27 |
BM25_INDEX_PATH = "bm25_index.pkl"
|
| 28 |
+
|
| 29 |
CACHE_VERSION = "v1"
|
| 30 |
embedding_model = "e5-mistral-7b-instruct"
|
| 31 |
generation_model = "gemini-1.5-flash"
|