pankilshah commited on
Commit
0725159
·
verified ·
1 Parent(s): a6676db

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ log_file_path = "logs/predictions.log"
14
  # Configure logging to write to a log file
15
  logging.basicConfig(
16
  filename=log_file_path,
17
- level=logging.ERROR,
18
  # format="%(asctime)s - ID: %(uuid)s - age: %age()s"
19
  )
20
 
@@ -37,7 +37,7 @@ def predict_charges(i_age, i_sex, i_bmi, i_children, i_smoker, i_region):
37
  prediction = model.predict(input_data)[0]
38
 
39
  # Log the inputs and the prediction
40
- logging.info(
41
  f"ID: {uuid.uuid4()} | age: {i_age} | sex: {i_sex} | bmi: {i_bmi} | children: {i_children} | smoker: {i_smoker} | region: {i_region} | prediction: {prediction}"
42
  )
43
 
 
14
  # Configure logging to write to a log file
15
  logging.basicConfig(
16
  filename=log_file_path,
17
+ level=logging.WARNING,
18
  # format="%(asctime)s - ID: %(uuid)s - age: %age()s"
19
  )
20
 
 
37
  prediction = model.predict(input_data)[0]
38
 
39
  # Log the inputs and the prediction
40
+ logging.warning(
41
  f"ID: {uuid.uuid4()} | age: {i_age} | sex: {i_sex} | bmi: {i_bmi} | children: {i_children} | smoker: {i_smoker} | region: {i_region} | prediction: {prediction}"
42
  )
43