EnYa32's picture
Update README.md
12c5462 verified
|
Raw History Blame Contribute Delete
1.72 kB
---
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 app
- `requirements.txt` : Python dependencies
- `spaceship_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:
```python
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.