prasadnu commited on
Commit
79bf7a7
·
1 Parent(s): dbe4e1a

git ignore

Browse files
semantic_search/amazon_rekognition.py CHANGED
@@ -9,18 +9,11 @@ import streamlit as st
9
 
10
 
11
  from opensearchpy import OpenSearch, RequestsHttpConnection
12
- aos_host = 'search-opensearchservi-75ucark0bqob-bzk6r6h2t33dlnpgx2pdeg22gi.us-east-1.es.amazonaws.com'
13
 
14
- auth = ("username","password") #### input credentials
15
 
16
- aos_client = OpenSearch(
17
- hosts = [{'host': aos_host, 'port': 443}],
18
- http_auth = auth,
19
- use_ssl = True,
20
- verify_certs = True,
21
- connection_class = RequestsHttpConnection
22
- )
23
- rekog_client = boto3.client('rekognition', region_name='us-east-1')
24
 
25
  def extract_image_metadata(img):
26
  res = rekog_client.detect_labels(
 
9
 
10
 
11
  from opensearchpy import OpenSearch, RequestsHttpConnection
 
12
 
 
13
 
14
+ rekog_client = boto3.client('rekognition',aws_access_key_id=st.secrets['user_access_key'],
15
+ aws_secret_access_key=st.secrets['user_secret_key'],region_name='us-east-1')
16
+
 
 
 
 
 
17
 
18
  def extract_image_metadata(img):
19
  res = rekog_client.detect_labels(