Empowering Innovation Through Seamless Machine Learning Mastery
A comprehensive Machine Learning platform built with Flask, PyTorch, and scikit-learn, providing an interactive interface for model training, evaluation, and predictions.
- Multiple ML Models: Support for both traditional ML and deep learning approaches
- Interactive UI: Web interface for data upload, model training, and predictions
- Visualization: Real-time plots and metrics for model performance
- Model Management: Save and load trained models
- RESTful API: Endpoints for model inference and management
PyTorch-ML-Lab/
βββ api/ # API endpoints for Vercel serverless deployment
βββ ml_models/ # Machine learning model implementations
β βββ base_model.py # Base class for all models
β βββ deep_learning.py # PyTorch neural network implementations
β βββ traditional_ml.py # Scikit-learn based models
βββ static/ # Static assets (CSS, JS, images)
βββ templates/ # HTML templates
βββ utils/ # Utility functions
β βββ data_preprocessing.py
β βββ evaluation.py
β βββ visualization.py
βββ app.py # Main Flask application
βββ requirements.txt # Project dependencies
- Python 3.8 or higher
- pip package manager
- Virtual environment (recommended)
-
Clone the repository
git clone https://github.com/shretadas/PyTorch-ML-Lab.git cd PyTorch-ML-Lab -
Create and activate virtual environment
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Run the application
python app.py
The application will be available at http://localhost:5000
- Create a Render account at https://render.com
- Create a new Web Service
- Connect your GitHub repository
- Configure the service:
- Build Command:
pip install -r requirements.txt - Start Command:
gunicorn app:app - Python Version: 3.8 or higher
- Build Command:
- Create an AWS account
- Set up an EC2 instance or use AWS Elastic Beanstalk
- Configure environment variables
- Deploy using AWS CLI or GitHub Actions
- Create a GCP account
- Enable Cloud Run or App Engine
- Configure using
app.yaml - Deploy using Cloud SDK
POST /api/train
Content-Type: application/json
{
"model_type": "deep_learning",
"data_path": "path/to/data.csv",
"parameters": {
"learning_rate": 0.001,
"epochs": 100
}
}POST /api/predict
Content-Type: application/json
{
"model_id": "model_123",
"data": [...]
}base_model.py: Abstract base class defining the model interfacedeep_learning.py: PyTorch neural network implementationstraditional_ml.py: Scikit-learn based models
data_preprocessing.py: Data cleaning and transformationevaluation.py: Model evaluation metricsvisualization.py: Plotting and visualization tools
- Interactive dashboards for model training
- Visualization of model performance
- Model management interface
The platform generates various visualizations:
- Learning curves
- Feature importance plots
- Confusion matrices
- Prediction vs Actual plots
- Residual analysis
Required environment variables:
FLASK_SECRET_KEY=your_secret_key
DATABASE_URL=your_database_url
MODEL_STORAGE_PATH=path/to/store/models
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- PyTorch team for the excellent deep learning framework
- Scikit-learn community for machine learning tools
- Flask team for the web framework
For questions and feedback:
- GitHub Issues: Create an issue