Update components/predict.py
Browse files- components/predict.py +2 -2
components/predict.py
CHANGED
|
@@ -30,8 +30,8 @@ def predict(pregnancies, glucose, blood_pressure, insulin, bmi, age, user_state)
|
|
| 30 |
|
| 31 |
try:
|
| 32 |
prediction = model.predict(data_np)[0]
|
| 33 |
-
result_text = "
|
| 34 |
-
final_result = f"
|
| 35 |
|
| 36 |
# Log prediction if user ID exists
|
| 37 |
if user_state.get("id"):
|
|
|
|
| 30 |
|
| 31 |
try:
|
| 32 |
prediction = model.predict(data_np)[0]
|
| 33 |
+
result_text = "Chances of having Diabetes , consult to the doctors!! " if prediction == 1 else "Congratulations, No chances of having Diabetes !!"
|
| 34 |
+
final_result = f" {result_text}"
|
| 35 |
|
| 36 |
# Log prediction if user ID exists
|
| 37 |
if user_state.get("id"):
|