Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
RAG changes
Browse files
RAG/rag_DocumentSearcher.py
CHANGED
|
@@ -16,7 +16,7 @@ import utilities.re_ranker as re_ranker
|
|
| 16 |
import utilities.invoke_models as invoke_models
|
| 17 |
#import langchain
|
| 18 |
headers = {"Content-Type": "application/json"}
|
| 19 |
-
host = "https://search-opensearchservi-
|
| 20 |
|
| 21 |
parent_dirname = "/".join((os.path.dirname(__file__)).split("/")[0:-1])
|
| 22 |
|
|
|
|
| 16 |
import utilities.invoke_models as invoke_models
|
| 17 |
#import langchain
|
| 18 |
headers = {"Content-Type": "application/json"}
|
| 19 |
+
host = "https://search-opensearchservi-shjckef2t7wo-iyv6rajdgxg6jas25aupuxev6i.us-west-2.es.amazonaws.com/"
|
| 20 |
|
| 21 |
parent_dirname = "/".join((os.path.dirname(__file__)).split("/")[0:-1])
|
| 22 |
|
pages/Multimodal_Conversational_Search.py
CHANGED
|
@@ -112,30 +112,14 @@ st.markdown("""
|
|
| 112 |
</style>
|
| 113 |
""",unsafe_allow_html=True)
|
| 114 |
|
| 115 |
-
################ OpenSearch Py client #####################
|
| 116 |
-
|
| 117 |
-
# credentials = boto3.Session().get_credentials()
|
| 118 |
-
# awsauth = AWSV4SignerAuth(credentials, region, service)
|
| 119 |
-
|
| 120 |
-
# ospy_client = OpenSearch(
|
| 121 |
-
# hosts = [{'host': 'search-opensearchservi-75ucark0bqob-bzk6r6h2t33dlnpgx2pdeg22gi.us-east-1.es.amazonaws.com', 'port': 443}],
|
| 122 |
-
# http_auth = awsauth,
|
| 123 |
-
# use_ssl = True,
|
| 124 |
-
# verify_certs = True,
|
| 125 |
-
# connection_class = RequestsHttpConnection,
|
| 126 |
-
# pool_maxsize = 20
|
| 127 |
-
# )
|
| 128 |
|
| 129 |
-
################# using boto3 credentials ###################
|
| 130 |
|
| 131 |
|
| 132 |
credentials = boto3.Session().get_credentials()
|
| 133 |
-
awsauth = HTTPBasicAuth('
|
| 134 |
service = 'es'
|
| 135 |
|
| 136 |
|
| 137 |
-
################# using boto3 credentials ####################
|
| 138 |
-
|
| 139 |
|
| 140 |
|
| 141 |
# if "input_searchType" not in st.session_state:
|
|
|
|
| 112 |
</style>
|
| 113 |
""",unsafe_allow_html=True)
|
| 114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
|
|
|
| 116 |
|
| 117 |
|
| 118 |
credentials = boto3.Session().get_credentials()
|
| 119 |
+
awsauth = awsauth = HTTPBasicAuth('master',st.secrets['ml_search_demo_api_access'])
|
| 120 |
service = 'es'
|
| 121 |
|
| 122 |
|
|
|
|
|
|
|
| 123 |
|
| 124 |
|
| 125 |
# if "input_searchType" not in st.session_state:
|