Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -53,8 +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")
|
@@ -75,7 +75,7 @@ bm25 = BM25Encoder().load("./bm25_traveler_website.json")
|
|
75 |
##################################################
|
76 |
##################################################
|
77 |
|
78 |
-
old_embed_model = HuggingFaceEmbeddings(model_name="sentence-transformers/
|
79 |
|
80 |
# Initialize models and retriever
|
81 |
embed_model = HuggingFaceEmbeddings(model_name="Alibaba-NLP/gte-large-en-v1.5", model_kwargs={"trust_remote_code":True})
|
@@ -209,5 +209,4 @@ def index_view():
|
|
209 |
|
210 |
# Main function to run the app
|
211 |
if __name__ == '__main__':
|
212 |
-
print("Hello world")
|
213 |
socketio.run(app, debug=True)
|
|
|
53 |
##################################################
|
54 |
|
55 |
# Initialize Pinecone index and BM25 encoder
|
56 |
+
pinecone_index = initialize_pinecone("uae-national-library-and-archives-vectorstore")
|
57 |
+
bm25 = BM25Encoder().load("./UAE-NLA.json")
|
58 |
|
59 |
### This is for UAE Legislation Website
|
60 |
# pinecone_index = initialize_pinecone("uae-legislation-site-data")
|
|
|
75 |
##################################################
|
76 |
##################################################
|
77 |
|
78 |
+
old_embed_model = HuggingFaceEmbeddings(model_name="sentence-transformers/gte-multilingual-base")
|
79 |
|
80 |
# Initialize models and retriever
|
81 |
embed_model = HuggingFaceEmbeddings(model_name="Alibaba-NLP/gte-large-en-v1.5", model_kwargs={"trust_remote_code":True})
|
|
|
209 |
|
210 |
# Main function to run the app
|
211 |
if __name__ == '__main__':
|
|
|
212 |
socketio.run(app, debug=True)
|