--- title: SalesPrediction emoji: 🚀 colorFrom: red colorTo: red sdk: docker app_port: 8501 tags: - streamlit pinned: false short_description: Streamlit app predicting sales using XGBoost. license: mit --- # 📊 Advertising Sales Prediction This is a simple Streamlit app that predicts product sales using a trained **XGBoost regression model**. The model uses three inputs: **TV**, **Radio**, and **Newspaper** advertising budgets. --- ## 🚀 Live App You can test the model directly on HuggingFace Spaces. Enter the budgets and click **Predict Sales** to see the result. --- ## 🧠 Project Summary This project is part of my regression assignment. I trained multiple models and selected **XGBoost** because it gave the best performance. **Model Performance:** - R²: ~0.95 - RMSE: ~1.14 - MAE: ~0.87 The final model is saved as `xgb_model.json` and loaded inside the app. --- ## 🖥️ How the App Works 1. Enter values for TV, Radio, and Newspaper budgets 2. Click **Predict Sales** 3. The app displays the predicted number of sales 4. A simple Plotly chart shows how predictions change when the TV budget varies --- ## 📂 Files in This Space ├── README.md ├── requirements.txt └── src/ ├── streamlit_app.py └── xgb_model.json yaml Code kopieren --- ## 📦 Requirements streamlit xgboost scikit-learn numpy pandas plotly