kgauvin603 commited on
Commit
fb796b2
·
verified ·
1 Parent(s): 5f66429

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -41,15 +41,14 @@ def predict(age, bmi, children, sex, smoker, region):
41
  'region': region}
42
 
43
  df = pd.DataFrame(data, index=[0])
44
- prediction = model.predict(df)[0]
45
- prediction = float(prediction)
46
 
47
  # Apply the same transformations used in training
48
- #transformed_df = model.named_steps['columntransformer'].transform(df)
49
  #print("Transformed DataFrame:", transformed_df) # Debug transformed data
 
 
50
 
51
- # Predict using the trained model
52
- #p rediction = model.predict(df)[0]
53
 
54
 
55
  # Prepare the log entry
 
41
  'region': region}
42
 
43
  df = pd.DataFrame(data, index=[0])
 
 
44
 
45
  # Apply the same transformations used in training
46
+ transformed_df = model.named_steps['columntransformer'].transform(df)
47
  #print("Transformed DataFrame:", transformed_df) # Debug transformed data
48
+ prediction = model.predict(df)[0]
49
+ prediction = float(prediction)
50
 
51
+
 
52
 
53
 
54
  # Prepare the log entry