Spaces:
Running
on
T4
Running
on
T4
change ksize in RAG
Browse files
semantic_search/all_search_execute.py
CHANGED
@@ -401,7 +401,7 @@ def handler(input_,session_id):
|
|
401 |
|
402 |
if(len(hybrid_payload["query"]["hybrid"]["queries"])==1):
|
403 |
if(st.session_state.input_mvector_rerank and 'Vector Search' in search_types):
|
404 |
-
path = "retail-search-colbert-description/_search"
|
405 |
url = host + path
|
406 |
r = requests.get(url, auth=awsauth, json=hybrid_payload, headers=headers)
|
407 |
response_ = json.loads(r.text)
|
|
|
401 |
|
402 |
if(len(hybrid_payload["query"]["hybrid"]["queries"])==1):
|
403 |
if(st.session_state.input_mvector_rerank and 'Vector Search' in search_types):
|
404 |
+
path = "retail-search-colbert-description-reindex/_search"
|
405 |
url = host + path
|
406 |
r = requests.get(url, auth=awsauth, json=hybrid_payload, headers=headers)
|
407 |
response_ = json.loads(r.text)
|
utilities/mvectors.py
CHANGED
@@ -10,7 +10,7 @@ runtime = boto3.client('sagemaker-runtime',aws_access_key_id=st.secrets['user_ac
|
|
10 |
aws_secret_access_key=st.secrets['user_secret_key'],region_name='us-east-1')
|
11 |
# Load Tokenizer from HuggingFace Hub
|
12 |
tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/all-MiniLM-L6-v2')
|
13 |
-
endpoint_name = '
|
14 |
|
15 |
|
16 |
def mean_pooling(token_embeddings, attention_mask):
|
|
|
10 |
aws_secret_access_key=st.secrets['user_secret_key'],region_name='us-east-1')
|
11 |
# Load Tokenizer from HuggingFace Hub
|
12 |
tokenizer = AutoTokenizer.from_pretrained('sentence-transformers/all-MiniLM-L6-v2')
|
13 |
+
endpoint_name = 'all-MiniLM-L6-v2-model'
|
14 |
|
15 |
|
16 |
def mean_pooling(token_embeddings, attention_mask):
|