This is the complete Smart Pricing AI system that provides intelligent pricing optimization using machine learning. The system includes a Flask backend with a trained ML model and a responsive web frontend.
app.py- Main Flask application with ML model integrationindex.html- Complete frontend interface (place instatic/folder)smart_pricing_model.pkl- Trained machine learning modelretail_price.csv- Training datasetREADME.md- This setup guide-Smart_Pricing_AI.ipynb-– Jupyter notebook used to train the model
pip install flask flask-cors scikit-learn pandas numpyCreate the following directory structure:
smart_pricing_ai/
|├── Smart_Pricing_AI.ipynb
├── app.py
├── static/
│ └── index.html
├── smart_pricing_model.pkl
└── retail_price.csv
python app.pyThe application will start on http://127.0.0.1:5000
- ✅ Real-time pricing optimization
- ✅ Multiple pricing strategies (Conservative, Standard, Aggressive)
- ✅ Competitor analysis integration
- ✅ Market positioning insights
- ✅ Responsive web interface
- ✅ Sample data loading for testing
GET /- Main web interfacePOST /api/optimize- Get pricing recommendationsGET /api/sample- Load sample dataGET /api/health- Check system health
- R² Score: 0.992
- RMSE: 6.71
- Trained on 676 retail pricing records
- Supports 9 product categories
- Open the web interface
- Select product category
- Fill in product details and competitor prices
- Click "Get Pricing Recommendations"
- Review AI-generated pricing strategies
- Ensure all dependencies are installed
- Check that the model file is in the same directory as app.py
- Verify Flask is running on the correct port
- Use "Load Sample Data" to test functionality
The system is fully functional and tested. All JavaScript issues have been resolved and the ML model is properly trained and integrated.