Welcome to the CultureConnect Machine Learning API! 🚀
This repository contains the ML model that provides recommendations based on user preferences and cultural data. It powers AI-driven features in the CultureConnect platform.
✅ Recommendation System – Suggests destinations based on user preferences.
✅ Dataset Integration – Uses structured data for training and inference.
✅ Flask API – Serves predictions through an HTTP interface.
✅ Virtual Environment – Isolated dependencies using venv.
- Python 🐍 – Primary language for ML development.
- Flask 🌐 – Lightweight web framework to serve ML models.
- Pandas 📊 – Data manipulation and analysis.
- NumPy 🔢 – Efficient numerical computing.
- scikit-learn 🤖 – Machine learning algorithms.
ml/
│-- venv/ # Virtual environment (dependencies isolated)
│ ├── Include/
│ ├── Lib/
│ ├── Scripts/
│ ├── pyvenv.cfg
│
│-- .gitignore # Ignore unnecessary files (venv, cache, etc.)
│-- app.py # Flask application to serve the ML model
│-- dataset.csv # Dataset used for training and recommendations
│-- LICENSE # Project license
│-- README.md # Documentation (this file)
│-- recommendations.py # Core recommendation engine logic
│-- requirements.txt # Required dependencies for the ML model
git clone https://github.com/CultureConnect-team/CultureConnect-ML.gitNavigate to the project directory and create a virtual environment:
cd CultureConnect-ML
python -m venv venv- Windows
venv\Scripts\activate
- macOS/Linux
source venv/bin/activate
pip install -r requirements.txtpython app.pyThe API will be available at http://127.0.0.1:5000 or at http://127.0.0.1:5001.
| METHOD | ENDPOINT | DESCRIPTION |
|---|---|---|
| POST | /recommend |
Get personalized destination recommendations |
{
"user_preferences": ["nature", "culture", "historical"]
}{
"recommendations": [
{"destination": "Bali", "score": 0.92},
{"destination": "Yogyakarta", "score": 0.87}
]
}- Dataset (
dataset.csv) – Contains information about various tourist destinations, categorized by features such as culture, adventure, history, etc. - ML Model (
recommendations.py) – Uses scikit-learn to process user input and generate recommendations. - Flask API (
app.py) – Serves the ML model through an HTTP API.
We welcome contributions! Follow these steps:
- Fork the repository.
- Create a new branch (
feature/your-feature-name). - Make changes and commit with a clear message.
- Push your branch and create a Pull Request (PR).
Please follow Python best practices and formatting (PEP 8).
If you encounter issues:
- Ensure Python is installed (
python --version). - Activate the virtual environment before running the API.
- If dependencies fail, try:
pip install --upgrade pip pip install -r requirements.txt
- Restart the API with
python app.py.
This project is licensed under the MIT License – see the LICENSE file for details.
🚀 Happy coding! 🎯