seanpedrickcase commited on
Commit
2806807
·
1 Parent(s): a95ef9f

Minor changes to function outputs. Attempted Python downgrade to 3.10 to address xlsx output issues

Browse files
Files changed (2) hide show
  1. Dockerfile +4 -1
  2. search_funcs/bm25_functions.py +2 -2
Dockerfile CHANGED
@@ -1,5 +1,8 @@
1
  # First stage: build dependencies
2
- FROM public.ecr.aws/docker/library/python:3.11.9-slim-bookworm
 
 
 
3
 
4
  # Install Lambda web adapter in case you want to run with with an AWS Lamba function URL
5
  COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
 
1
  # First stage: build dependencies
2
+ #FROM public.ecr.aws/docker/library/python:3.11.9-slim-bookworm
3
+
4
+ # Trying Python 10 as I saw somewhere that Python 11 may result in corrupted openpyxl xlsx outputs
5
+ FROM public.ecr.aws/docker/library/python:3.10.14-slim-bookworm
6
 
7
  # Install Lambda web adapter in case you want to run with with an AWS Lamba function URL
8
  COPY --from=public.ecr.aws/awsguru/aws-lambda-adapter:0.8.3 /lambda-adapter /opt/extensions/lambda-adapter
search_funcs/bm25_functions.py CHANGED
@@ -456,7 +456,7 @@ def prepare_bm25(
456
  if not in_file:
457
  out_message ="No input file found. Please load in at least one file."
458
  print(out_message)
459
- return out_message, None, None
460
 
461
  if not prepared_search_text_list:
462
  out_message = "No data file found. Please load in at least one csv/Excel/Parquet file."
@@ -511,7 +511,7 @@ def prepare_bm25(
511
 
512
  message = "Search parameters loaded."
513
 
514
- return message, bm25_search_file_name, bm25
515
 
516
  message = "Search parameters loaded."
517
 
 
456
  if not in_file:
457
  out_message ="No input file found. Please load in at least one file."
458
  print(out_message)
459
+ return out_message, None, None, None
460
 
461
  if not prepared_search_text_list:
462
  out_message = "No data file found. Please load in at least one csv/Excel/Parquet file."
 
511
 
512
  message = "Search parameters loaded."
513
 
514
+ return message, bm25_search_file_name, bm25, prepared_search_text_list
515
 
516
  message = "Search parameters loaded."
517