Spaces:
Runtime error
Runtime error
|
Download New folder/src/README.md from MHuzaifaa/hackathonn: direct link, hf CLI and curl.
- Browser
- Download file 1.01 kB
-
https://huggingface.co/spaces/MHuzaifaa/hackathonn/resolve/main/New%20folder/src/README.md
- Command line
-
hf download 'hf://spaces/MHuzaifaa/hackathonn/New folder/src/README.md'
-
curl -L -o README.md https://huggingface.co/spaces/MHuzaifaa/hackathonn/resolve/main/New%20folder/src/README.md
1.01 kB
SF Crime Prediction App
This is a Streamlit application for predicting crime categories in San Francisco using an XGBoost model.
Setup
Install Dependencies:
pip install -r requirements.txtRun the App:
streamlit run streamlit_app.pyOr simply double-click
run_app.bat.
Model Info
The app uses crime_xgb_artifacts.pkl which contains:
- XGBoost Model
- LabelEncoder for Target (Crime Category)
- FeatureHashers for Address and Description
Note: The model expects specific features including hashed Address and Description. Ensure you provide these inputs in the UI for accurate predictions. Note: The District encoder was missing from the provided files, so a default alphabetical mapping is used.
Deployment
To deploy on the web (e.g., Streamlit Cloud):
- Push this code to a GitHub repository.
- Sign up for Streamlit Cloud.
- Connect your GitHub and deploy the app.