igrisds commited on
Commit
4538fa2
1 Parent(s): 3487766

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -8
app.py CHANGED
@@ -40,14 +40,10 @@ def create_s3_client():
40
 
41
  def read_json_from_s3():
42
 
43
- try:
44
- response = s3_client.get_object(Bucket=BUCKET_NAME, Key=EXTRACTIONS_PATH)
45
- file_content = response['Body'].read().decode('utf-8')
46
- json_content = json.loads(file_content)
47
- except Exception as e:
48
- yield f"Error reading JSON file from S3: {e}"
49
- return None
50
-
51
  return json_content
52
 
53
  def get_titan_embedding(bedrock, doc_name, text, attempt=0, cutoff=10000):
 
40
 
41
  def read_json_from_s3():
42
 
43
+ response = s3_client.get_object(Bucket=BUCKET_NAME, Key=EXTRACTIONS_PATH)
44
+ file_content = response['Body'].read().decode('utf-8')
45
+ json_content = json.loads(file_content)
46
+
 
 
 
 
47
  return json_content
48
 
49
  def get_titan_embedding(bedrock, doc_name, text, attempt=0, cutoff=10000):