SalesSense is an intuitive web app powered by cutting-edge machine learning models that provides real-time sales forecasts, helping businesses optimize inventory, boost profits, and make data-driven decisions effortlessly 💼💰🤖
- Introduction 📝
- Features ✨
- Demo 🚀
- Getting Started 🏁
- App Structure 🧱
- Usage 📊
- Technologies Used 💻🔬
- Data Preprocessing 🧹🧮
- Model Training 🤖📓
- Contributing 🤝🙌
- License 📜
The SalesSense app leverages machine learning models to provide real-time sales forecasts for businesses. It offers an intuitive and user-friendly interface to input relevant data and instantly receive sales predictions.
- Real-time sales predictions.
- Interactive user interface.
- Visualize sales trends over time.
- User-friendly design.
- Support for different product families.
- Data preprocessing and model training.
Follow these instructions to get the app up and running on your local machine.
-
Clone the repository:
git clone https://github.com/snyamson/P4-SalesSense-Interactive-Sales-Forecasting-Web-Application.git cd P4-SalesSense-Interactive-Sales-Forecasting-Web-Application
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows, use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
Run the Streamlit app using the following command:
streamlit run src/app/app.py
Access the app through your web browser at http://localhost:8501
.
src
: The main application directory.app/
: Directory containing app components, utility functions and the main application scriptapp.py
.model/
: Directory for storing pre-trained model and preprocessing tool.notebook/
: Directory containing the data and the jupyter notebook for model training.
- Fill in the required fields such as the family of the store, store type, date, items on promotion, previous sales, and rolling mean.
- Click the "Submit" button to receive a real-time sales prediction.
- Click the "View Trends" tab on the app.
- Explore the historical sales trends using the line chart.
- Click the "Make Prediction" button to go back to the prediction form.
- Streamlit: Python web application framework.
- Pandas: Data manipulation and analysis library.
- Scikit-Learn: Machine learning library.
- XGBoost: Gradient boosting library.
- Joblib: Serialization and deserialization of models.
- HTML/CSS: Styling and layout.
The app preprocesses input data to ensure compatibility with the machine learning model. It scales and transforms the data as needed for accurate predictions using the preprocessor exported from the notebook.
The app employs a pre-trained XGBoost machine learning model (Details about training can be found in the notebook). The model was trained on historical sales data to provide accurate forecasts.
Contributions to the SalesSense app project are welcome. Please follow these guidelines for contributing:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature-name
- Make your changes and commit them with clear, concise commit messages.
- Push your changes to your fork.
- Create a pull request against the main repository.
This project is licensed under the MIT License.
Solomon Nyamson
Connect with me on LinkedIn: LinkedIn Profile
Feel free to star ⭐ this repository if you find it helpful!