Ritesh-hf commited on
Commit
933359c
·
verified ·
1 Parent(s): 89a862e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -57,8 +57,8 @@ def initialize_pinecone(index_name: str):
57
  # bm25 = BM25Encoder().load("./UAE-NLA.json")
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
@@ -67,8 +67,8 @@ bm25 = BM25Encoder().load("./bm25_uae_legislation_data.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
 
@@ -78,7 +78,7 @@ bm25 = BM25Encoder().load("./bm25_uae_legislation_data.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="Alibaba-NLP/gte-large-en-v1.5", model_kwargs={"trust_remote_code":True})
82
  retriever = PineconeHybridSearchRetriever(
83
  embeddings=embed_model,
84
  sparse_encoder=bm25,
 
57
  # bm25 = BM25Encoder().load("./UAE-NLA.json")
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
 
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
 
 
78
  # old_embed_model = HuggingFaceEmbeddings(model_name="sentence-transformers/gte-multilingual-base")
79
 
80
  # Initialize models and retriever
81
+ embed_model = HuggingFaceEmbeddings(model_name="sentence-transformers/gte-multilingual-base", model_kwargs={"trust_remote_code":True})
82
  retriever = PineconeHybridSearchRetriever(
83
  embeddings=embed_model,
84
  sparse_encoder=bm25,