Views
No views yet
1from huggingface_hub import hf_hub_download
2import pickle
3
4model_path = hf_hub_download(repo_id="Gaballa-ML/xgboost-diabetes-pima-project", filename="model.pkl")
5with open(model_path, 'rb') as f:
6 model = pickle.load(f)
7
8# Predict: [Pregnancies, Glucose, BloodPressure, SkinThickness, Insulin, BMI, DiabetesPedigreeFunction, Age]
9prediction = model.predict([[6, 148, 72, 35, 0, 33.6, 0.627, 50]])
10print("Diabetes Prediction (0=No, 1=Yes):", prediction[0])