Spaces:
Running
on
T4
Running
on
T4
RAG changes
Browse files- .gitignore +1 -1
- RAG/rag_DocumentLoader.py +6 -3
.gitignore
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
**/__pycache__/
|
2 |
*.DS_Store
|
3 |
-
|
|
|
1 |
**/__pycache__/
|
2 |
*.DS_Store
|
3 |
+
vs
|
RAG/rag_DocumentLoader.py
CHANGED
@@ -21,17 +21,20 @@ import generate_csv_for_tables
|
|
21 |
from pdf2image import convert_from_bytes,convert_from_path
|
22 |
#import langchain
|
23 |
|
24 |
-
bedrock_runtime_client = boto3.client('bedrock-runtime',
|
25 |
-
|
|
|
|
|
26 |
|
27 |
region = 'us-east-1'
|
28 |
service = 'es'
|
29 |
|
30 |
credentials = boto3.Session().get_credentials()
|
31 |
auth = HTTPBasicAuth('prasadnu',st.secrets['rag_shopping_assistant_os_api_access'])
|
|
|
32 |
|
33 |
ospy_client = OpenSearch(
|
34 |
-
hosts = [{'host': 'search-opensearchservi-
|
35 |
http_auth = auth,
|
36 |
use_ssl = True,
|
37 |
verify_certs = True,
|
|
|
21 |
from pdf2image import convert_from_bytes,convert_from_path
|
22 |
#import langchain
|
23 |
|
24 |
+
bedrock_runtime_client = boto3.client('bedrock-runtime',aws_access_key_id=st.secrets['user_access_key'],
|
25 |
+
aws_secret_access_key=st.secrets['user_secret_key'],region_name='us-east-1')
|
26 |
+
textract_client = boto3.client('textract',aws_access_key_id=st.secrets['user_access_key'],
|
27 |
+
aws_secret_access_key=st.secrets['user_secret_key'],region_name='us-east-1')
|
28 |
|
29 |
region = 'us-east-1'
|
30 |
service = 'es'
|
31 |
|
32 |
credentials = boto3.Session().get_credentials()
|
33 |
auth = HTTPBasicAuth('prasadnu',st.secrets['rag_shopping_assistant_os_api_access'])
|
34 |
+
#"https://search-opensearchservi-shjckef2t7wo-iyv6rajdgxg6jas25aupuxev6i.us-west-2.es.amazonaws.com/"
|
35 |
|
36 |
ospy_client = OpenSearch(
|
37 |
+
hosts = [{'host': 'search-opensearchservi-shjckef2t7wo-iyv6rajdgxg6jas25aupuxev6i.us-west-2.es.amazonaws.com', 'port': 443}],
|
38 |
http_auth = auth,
|
39 |
use_ssl = True,
|
40 |
verify_certs = True,
|