This guide will help you set up the FIFA Player Recommendation System on your local machine.
Before you begin, ensure you have the following installed:
git clone https://github.com/inboxpraveen/FIFA-Player-Recomendation.git
cd FIFA-Player-Recomendation
Windows:
python -m venv venv
venv\Scripts\activate
macOS/Linux:
python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
This will install:
Ensure the datasets are in place:
new-data/
├── male_players.csv (~16,000 players)
└── female_players.csv (~1,500 players)
# Train both models (default)
python training/train.py
# Train only male players model
python training/train.py --male
# Train only female players model
python training/train.py --female
# Skip specific model
python training/train.py --skip-male # Train female only
python training/train.py --skip-female # Train male only
📖 For detailed training options and troubleshooting, see training/README.md
This will:
models/ directoryTraining Time:
Expected Output:
models/
├── male_model.pkl (~1 GB)
└── female_model.pkl (~10 MB)
python run.py
Or directly run the Flask app:
cd app
python main.py
Open your web browser and navigate to:
http://localhost:5000
You should see the FIFA Player Recommendation System home page!
Solution: Train the models first (Step 5)
Solution: Ensure virtual environment is activated and dependencies are installed
pip install -r requirements.txt
Solution: Use a different port
# Edit app/main.py, change:
app.run(debug=True, host='0.0.0.0', port=5001) # Use 5001 instead
Solution: Ensure you’re in the project root directory
cd FIFA-Player-Recomendation
python training/train.py
Solution: Ensure you have at least 2 GB free RAM
Solution: Ensure CSV files are UTF-8 encoded
After installation, verify everything works:
For production deployment, see Deployment Guide in PROJECT_SUMMARY.md.
# Install gunicorn
pip install gunicorn
# Run with gunicorn
gunicorn -w 4 -b 0.0.0.0:5000 app.main:app
Once installed:
If you encounter issues:
To remove the application:
# Deactivate virtual environment
deactivate
# Remove project directory
cd ..
rm -rf FIFA-Player-Recomendation # macOS/Linux
# or
rmdir /s /q FIFA-Player-Recomendation # Windows
Happy Recommending! ⚽