Downloads · 30 days
0
HussienElhaddad/Titanic-Classification-DEPI-Mini-Project
Titanic-Classification-DEPI-Mini-Project is a machine learning model from HussienElhaddad. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model predicts whether a passenger survived the Titanic disaster based on features such as age, gender, passenger class, and more. It was developed as part of the DEPI Mini Project using the Titanic dataset from…
Downloads · 30 days
0
Access
Public
Updated Sep 2, 2025
Repo size
1.3 KB
Likes
0
Public
Click a slice to open those files.
.py9.5 KB · 65%
From the Hugging Face model README
This model predicts whether a passenger survived the Titanic disaster based on features such as age, gender, passenger class, and more.
It was developed as part of the DEPI Mini Project using the Titanic dataset from Kaggle.
⚠️ Not intended for real-world predictive use — dataset is historical and simplified.
from huggingface_hub import hf_hub_download
import joblib
# Download model from Hugging Face Hub
model_path = hf_hub_download(repo_id="HussienElhaddad/Titanic-Classification-DEPI-Mini-Project", filename="titanic_model.pkl")
model = joblib.load(model_path)
# Example input (Age=22, Sex=male, Pclass=3, etc.)
X_new = [[22, 0, 3, 1, 0, 7.25, 2]]
prediction = model.predict(X_new)
print("Survived" if prediction[0] == 1 else "Not Survived")