Update app.py
Browse files
app.py
CHANGED
@@ -53,24 +53,8 @@ def initialize_pinecone(index_name: str):
|
|
53 |
##################################################
|
54 |
|
55 |
# Initialize Pinecone index and BM25 encoder
|
56 |
-
pinecone_index = initialize_pinecone("
|
57 |
-
bm25 = BM25Encoder().load("./
|
58 |
-
|
59 |
-
### This is for UAE Legislation Website
|
60 |
-
# pinecone_index = initialize_pinecone("uae-legislation-site-data")
|
61 |
-
# bm25 = BM25Encoder().load("./bm25_uae_legislation_data.json")
|
62 |
-
|
63 |
-
|
64 |
-
### This is for u.ae Website
|
65 |
-
# pinecone_index = initialize_pinecone("vector-store-index")
|
66 |
-
# bm25 = BM25Encoder().load("./bm25_u.ae.json")
|
67 |
-
|
68 |
-
|
69 |
-
# #### This is for UAE Economic Department Website
|
70 |
-
# pinecone_index = initialize_pinecone("uae-department-of-economics-site-data")
|
71 |
-
# bm25 = BM25Encoder().load("./bm25_uae_department_of_economics_data.json")
|
72 |
-
|
73 |
-
|
74 |
|
75 |
##################################################
|
76 |
##################################################
|
@@ -78,7 +62,7 @@ bm25 = BM25Encoder().load("./UAE-NLA.json")
|
|
78 |
# old_embed_model = HuggingFaceEmbeddings(model_name="sentence-transformers/gte-multilingual-base")
|
79 |
|
80 |
# Initialize models and retriever
|
81 |
-
embed_model = HuggingFaceEmbeddings(model_name="
|
82 |
retriever = PineconeHybridSearchRetriever(
|
83 |
embeddings=embed_model,
|
84 |
sparse_encoder=bm25,
|
|
|
53 |
##################################################
|
54 |
|
55 |
# Initialize Pinecone index and BM25 encoder
|
56 |
+
pinecone_index = initialize_pinecone("mbzuai-policies")
|
57 |
+
bm25 = BM25Encoder().load("./mbzuai-policies.json")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
##################################################
|
60 |
##################################################
|
|
|
62 |
# old_embed_model = HuggingFaceEmbeddings(model_name="sentence-transformers/gte-multilingual-base")
|
63 |
|
64 |
# Initialize models and retriever
|
65 |
+
embed_model = HuggingFaceEmbeddings(model_name="GameScribes/stella_en_400M_v5", model_kwargs={"trust_remote_code":True})
|
66 |
retriever = PineconeHybridSearchRetriever(
|
67 |
embeddings=embed_model,
|
68 |
sparse_encoder=bm25,
|