Spaces:
Runtime error
Runtime error
prediction[0][0][0] trying to get the float value
Browse files
app.py
CHANGED
|
@@ -81,12 +81,12 @@ def predict_insurance_charge(age, bmi, children, sex, smoker, region):
|
|
| 81 |
'sex': sex,
|
| 82 |
'smoker': smoker,
|
| 83 |
'region': region,
|
| 84 |
-
'prediction': prediction[0]
|
| 85 |
}
|
| 86 |
))
|
| 87 |
f.write("\n")
|
| 88 |
|
| 89 |
-
prediction_result = prediction[0]
|
| 90 |
print(f"\nDebug - Prediction result: {prediction_result} - {type(prediction_result)}\n")
|
| 91 |
return prediction_result
|
| 92 |
|
|
|
|
| 81 |
'sex': sex,
|
| 82 |
'smoker': smoker,
|
| 83 |
'region': region,
|
| 84 |
+
'prediction': prediction[0][0][0]
|
| 85 |
}
|
| 86 |
))
|
| 87 |
f.write("\n")
|
| 88 |
|
| 89 |
+
prediction_result = prediction[0][0][0]S
|
| 90 |
print(f"\nDebug - Prediction result: {prediction_result} - {type(prediction_result)}\n")
|
| 91 |
return prediction_result
|
| 92 |
|