Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -10,13 +10,12 @@ import sys
|
|
| 10 |
import pickle
|
| 11 |
|
| 12 |
# Charger les modèles
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
exit(1)
|
| 20 |
|
| 21 |
# Fonction de prédiction du diabète
|
| 22 |
def predict_diabetes(pregnancies, glucose, blood_pressure, skin_thickness, insulin, bmi, dpf, age):
|
|
|
|
| 10 |
import pickle
|
| 11 |
|
| 12 |
# Charger les modèles
|
| 13 |
+
|
| 14 |
+
with open("lg.pkl", "rb") as f:
|
| 15 |
+
model = pickle.load(f)
|
| 16 |
+
with open("kmeans_model.pkl", "rb") as f:
|
| 17 |
+
model_cluster = pickle.load(f)
|
| 18 |
+
|
|
|
|
| 19 |
|
| 20 |
# Fonction de prédiction du diabète
|
| 21 |
def predict_diabetes(pregnancies, glucose, blood_pressure, skin_thickness, insulin, bmi, dpf, age):
|