aletrn commited on
Commit
810f896
·
1 Parent(s): 11778cb

[feat] add missing source_type argument on samexporter_predict use

Browse files
Files changed (2) hide show
  1. src/app.py +3 -1
  2. src/io/lambda_helpers.py +2 -1
src/app.py CHANGED
@@ -38,7 +38,9 @@ def lambda_handler(event: Dict, context: LambdaContext) -> str:
38
  app_logger.info(f"body_request => {type(body_request)}, {body_request}.")
39
 
40
  try:
41
- body_response = samexporter_predict(body_request["bbox"], body_request["prompt"], body_request["zoom"])
 
 
42
  app_logger.info(f"output body_response length:{len(body_response)}.")
43
  app_logger.debug(f"output body_response:{body_response}.")
44
  response = get_response(HTTPStatus.OK.value, start_time, context.aws_request_id, body_response)
 
38
  app_logger.info(f"body_request => {type(body_request)}, {body_request}.")
39
 
40
  try:
41
+ body_response = samexporter_predict(
42
+ body_request["bbox"], body_request["prompt"], body_request["zoom"], url_tile=body_request["source_type"]
43
+ )
44
  app_logger.info(f"output body_response length:{len(body_response)}.")
45
  app_logger.debug(f"output body_response:{body_response}.")
46
  response = get_response(HTTPStatus.OK.value, start_time, context.aws_request_id, body_response)
src/io/lambda_helpers.py CHANGED
@@ -71,7 +71,8 @@ def get_parsed_bbox_points(request_input: RawRequestInput) -> Dict:
71
  return {
72
  "bbox": [ne_latlng, sw_latlng],
73
  "prompt": new_prompt_list,
74
- "zoom": new_zoom
 
75
  }
76
 
77
 
 
71
  return {
72
  "bbox": [ne_latlng, sw_latlng],
73
  "prompt": new_prompt_list,
74
+ "zoom": new_zoom,
75
+ "source_type": request_input.source_type
76
  }
77
 
78