|
Download README.md from EnYa32/SpaceshipTitanicClassification: direct link, hf CLI and curl.
- Browser
- Download file 1.72 kB
-
https://huggingface.co/spaces/EnYa32/SpaceshipTitanicClassification/resolve/main/README.md
- Command line
-
hf download hf://spaces/EnYa32/SpaceshipTitanicClassification/README.md
-
curl -L -o README.md https://huggingface.co/spaces/EnYa32/SpaceshipTitanicClassification/resolve/main/README.md
1.72 kB
metadata
title: SpaceshipTitanicClassification
emoji: π
colorFrom: red
colorTo: red
sdk: docker
app_port: 8501
tags:
- streamlit
pinned: false
short_description: Predict if a passenger was transported in the SpaceshipTitan
license: mit
π Spaceship Titanic - Transported Predictor
This Streamlit app predicts whether a passenger was Transported to another dimension (True/False) based on passenger features from the Kaggle Spaceship Titanic dataset.
What this app does
- Single passenger prediction using an easy form
- Batch prediction by uploading a CSV file
- Outputs predictions in the same True/False style as Kaggle submissions
Model
- Gradient Boosting Classifier (scikit-learn)
- Validation accuracy around 0.79 (your current result)
Files in this repository
app.py: Streamlit apprequirements.txt: Python dependenciesspaceship_titanic_gb.pkl: saved model artifact (required)
Important: Required model artifact
The app expects this file in the repo root:
spaceship_titanic_gb.pkl
Create it in your notebook with:
import joblib
joblib.dump(
{
'model': gb,
'feature_columns': x.columns.tolist()
},
'spaceship_titanic_gb.pkl'
)
This makes the app safe because it uses the same one-hot encoded feature columns as training.
How to run locally
bash
Code kopieren
pip install -r requirements.txt
streamlit run app.py
Batch CSV format
Recommended columns:
PassengerId (optional, will be kept in output)
HomePlanet, Destination, Deck, Side
CryoSleep, VIP (values: True / False / Unknown)
Age
RoomService, FoodCourt, ShoppingMall, Spa, VRDeck
GroupSize
If some columns are missing, the app will try to fill defaults.