Views
No views yet
1from huggingface_hub import hf_hub_download
2import joblib
3
4# Download model from Hugging Face Hub
5model_path = hf_hub_download(repo_id="HussienElhaddad/Titanic-Classification-DEPI-Mini-Project", filename="titanic_model.pkl")
6model = joblib.load(model_path)
7
8# Example input (Age=22, Sex=male, Pclass=3, etc.)
9X_new = [[22, 0, 3, 1, 0, 7.25, 2]]
10prediction = model.predict(X_new)
11
12print("Survived" if prediction[0] == 1 else "Not Survived")