Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
multilingual
Browse files
semantic_search/all_search_execute.py
CHANGED
|
@@ -160,7 +160,7 @@ def handler(input_,session_id):
|
|
| 160 |
print("Hybrid Rerank Search Pipeline updated: "+str(r.status_code))
|
| 161 |
|
| 162 |
######## Updating opensearch_translation_pipeline Search pipeline #######
|
| 163 |
-
opensearch_translation_pipeline = (requests.get(host+'_search/pipeline/ml_inference_for_vector_search_and_language_translation', auth=awsauth,headers=headers)).text
|
| 164 |
path = "_search/pipeline/ml_inference_for_vector_search_and_language_translation"
|
| 165 |
url = host + path
|
| 166 |
opensearch_translation_pipeline["phase_results_processors"] = hybrid_search_processor
|
|
@@ -168,7 +168,7 @@ def handler(input_,session_id):
|
|
| 168 |
print("translation hybrid Search Pipeline updated: "+str(r.status_code))
|
| 169 |
|
| 170 |
######## Updating opensearch_translation_pipeline_with_rerank Search pipeline #######
|
| 171 |
-
opensearch_translation_pipeline_with_rerank = (requests.get(host+'_search/pipeline/ml_inference_for_vector_search_and_language_translation_with_rerank', auth=awsauth,headers=headers)).text
|
| 172 |
path = "_search/pipeline/ml_inference_for_vector_search_and_language_translation_with_rerank"
|
| 173 |
url = host + path
|
| 174 |
opensearch_translation_pipeline_with_rerank["phase_results_processors"] = hybrid_search_processor
|
|
|
|
| 160 |
print("Hybrid Rerank Search Pipeline updated: "+str(r.status_code))
|
| 161 |
|
| 162 |
######## Updating opensearch_translation_pipeline Search pipeline #######
|
| 163 |
+
opensearch_translation_pipeline = json.loads((requests.get(host+'_search/pipeline/ml_inference_for_vector_search_and_language_translation', auth=awsauth,headers=headers)).text)
|
| 164 |
path = "_search/pipeline/ml_inference_for_vector_search_and_language_translation"
|
| 165 |
url = host + path
|
| 166 |
opensearch_translation_pipeline["phase_results_processors"] = hybrid_search_processor
|
|
|
|
| 168 |
print("translation hybrid Search Pipeline updated: "+str(r.status_code))
|
| 169 |
|
| 170 |
######## Updating opensearch_translation_pipeline_with_rerank Search pipeline #######
|
| 171 |
+
opensearch_translation_pipeline_with_rerank = json.loads((requests.get(host+'_search/pipeline/ml_inference_for_vector_search_and_language_translation_with_rerank', auth=awsauth,headers=headers)).text)
|
| 172 |
path = "_search/pipeline/ml_inference_for_vector_search_and_language_translation_with_rerank"
|
| 173 |
url = host + path
|
| 174 |
opensearch_translation_pipeline_with_rerank["phase_results_processors"] = hybrid_search_processor
|