A Flask-based e-commerce targeting system for customer segmentation and personalized product recommendations. Upload structured interaction data, receive AI-driven suggestions, and analyze user behavior.
Ensure you have the following installed:
- Python 3.8+
- pip (Python package manager)
- Git (for cloning the repository)
On Windows:
python -m venv venv
venv\Scripts\activate
On macOS/Linux:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
On Windows:
set FLASK_APP=run.py
set FLASK_ENV=development
On macOS/Linux:
export FLASK_APP=run.py
export FLASK_ENV=development
flask run
🔗 Open http://127.0.0.1:5000 in your browser.
- Upload your dataset.
- Match required and additional columns.
- Run the segmentation or recommendation.
- View results.
- Open
config.py
. - Set
DEBUG_MODE = True
.
deactivate
visitorid,itemid,event
12345,6789,view
54321,1234,transaction
visitorid,total_views,total_addtocart,total_purchases
12345,10,2,1
54321,5,1,0
Listed in requirements.txt
:
flask
pandas
numpy
scikit-learn
matplotlib
seaborn
scipy
pip list | grep -E 'flask|pandas|numpy|scikit-learn|matplotlib|seaborn|scipy'
- Dependencies Not Installing: Ensure correct versions of Python and pip.
- Server Not Starting: Verify
FLASK_APP
is set torun.py
. - File Upload Issues: Ensure the dataset is in CSV format.
# Check Python and pip versions
python --version
pip --version
pip install --upgrade pip
# Check Flask app variable
echo $FLASK_APP
# Check file type
file uploads/sample.csv
- Fork the repository
- Create a new branch (
git checkout -b feature-branch
) - Commit your changes (
git commit -m "Added new feature"
) - Push to the branch (
git push origin feature-branch
) - Create a pull request
This project is licensed under the MIT License.
🌟 If you found this project helpful, please ⭐ the repository!