prasadnu commited on
Commit
ad75ca5
·
1 Parent(s): b481a29

rerank model

Browse files
pages/Multimodal_Conversational_Search.py CHANGED
@@ -39,7 +39,7 @@ AI_ICON = "images/opensearch-twitter-card.png"
39
  REGENERATE_ICON = "images/regenerate.png"
40
  s3_bucket_ = "pdf-repo-uploads"
41
  #"pdf-repo-uploads"
42
- @st.cache_data
43
  polly_client = boto3.client('polly',aws_access_key_id=st.secrets['user_access_key'],
44
  aws_secret_access_key=st.secrets['user_secret_key'], region_name = 'us-east-1')
45
 
@@ -100,7 +100,6 @@ if "input_rag_searchType" not in st.session_state:
100
 
101
 
102
  region = 'us-east-1'
103
- @st.cache_data
104
  bedrock_runtime_client = boto3.client('bedrock-runtime',region_name=region)
105
  output = []
106
  service = 'es'
 
39
  REGENERATE_ICON = "images/regenerate.png"
40
  s3_bucket_ = "pdf-repo-uploads"
41
  #"pdf-repo-uploads"
42
+
43
  polly_client = boto3.client('polly',aws_access_key_id=st.secrets['user_access_key'],
44
  aws_secret_access_key=st.secrets['user_secret_key'], region_name = 'us-east-1')
45
 
 
100
 
101
 
102
  region = 'us-east-1'
 
103
  bedrock_runtime_client = boto3.client('bedrock-runtime',region_name=region)
104
  output = []
105
  service = 'es'
utilities/invoke_models.py CHANGED
@@ -11,7 +11,7 @@ import streamlit as st
11
  #import torch
12
 
13
  region = 'us-east-1'
14
- @st.cache_data
15
  bedrock_runtime_client = boto3.client(
16
  'bedrock-runtime',
17
  aws_access_key_id=st.secrets['user_access_key'],
@@ -160,7 +160,7 @@ def read_from_table(file,question):
160
  "top_p":0.7,
161
  "stop_sequences":["\\n\\nHuman:"]
162
  }
163
- @st.cache_data
164
  model = BedrockChat(
165
  client=bedrock_runtime_client,
166
  model_id='anthropic.claude-3-sonnet-20240229-v1:0',
 
11
  #import torch
12
 
13
  region = 'us-east-1'
14
+
15
  bedrock_runtime_client = boto3.client(
16
  'bedrock-runtime',
17
  aws_access_key_id=st.secrets['user_access_key'],
 
160
  "top_p":0.7,
161
  "stop_sequences":["\\n\\nHuman:"]
162
  }
163
+
164
  model = BedrockChat(
165
  client=bedrock_runtime_client,
166
  model_id='anthropic.claude-3-sonnet-20240229-v1:0',