in app/python/main.py [0:0]
def home():
if PROCESSED_DATA_BUCKET is None:
return "Environment variable PROCESSED_DATA_BUCKET required", 500
fur = request.args.get("fur", "Gray")
age = request.args.get("age", "Adult")
location = request.args.get("location", "Above Ground")
logging.info(
f"Request received for fur: {fur}, age: {age}, location: {location}"
)
squirrel_count, data_points = retrieve_data(
fur=fur, age=age, location=location
)
# for validation testing, make array have no whitespace
data_points = str(data_points).replace(" ", "")
return render_template(
"index.html", squirrel_count=squirrel_count, data_points=data_points
)