Developed by: Mallelea Kranthi Kiran
A comprehensive AI-powered application suite featuring three advanced machine learning projects with production-ready deployment capabilities using Docker and Kubernetes. This repository demonstrates modern ML practices including real-time monitoring, interactive web interfaces, and containerized deployment.
| Project | Technology Stack | Interface | Status | Port |
|---|---|---|---|---|
| 🏥 Health Prediction Model | PyTorch, Streamlit, OpenAI API, Gemini API | Web Dashboard | ✅ Active | 8501 |
| 🐱🐶 Cat & Dog Classifier | TensorFlow, EfficientNet, ResNet, Gradio | Web Interface | ✅ Active | 7860 |
| 🎬 IMDB Sentiment Analysis | Keras, Bidirectional LSTM, NLTK | CLI/API | ✅ Active | - |
- 🔧 Prerequisites
- ⚡ Quick Start
- 📁 Project Structure
- 🏃 Running the Projects
- 📊 Individual Project Details
- 🐳 Docker & Kubernetes
- 🔍 Monitoring & Testing
- 🤝 Contributing
- 📄 License
- 👨💻 Author
- Python: 3.9 or higher
- Memory: Minimum 8GB RAM (16GB recommended for training)
- Storage: At least 10GB free space
- OS: Windows 10/11, macOS 10.15+, or Linux Ubuntu 18.04+
- Git: Version control system
- pip: Python package installer
- Docker (optional): For containerized deployment
- Kubernetes (optional): For orchestrated deployment
- OpenAI API Key: For advanced health chatbot features
- Google Gemini API Key: For AI-powered health assistance
- Kaggle API: For automatic dataset downloads
- NVIDIA GPU: GTX 1060 or better
- CUDA Toolkit: 11.0 or higher
- cuDNN: Compatible version with CUDA
- VRAM: Minimum 6GB for optimal training performance
git clone https://github.com/kranthikiran885366/ai-ml-projects-docker-kubernetes.git
cd ai-ml-projects-docker-kubernetes# Create virtual environment
python -m venv venv
# Activate virtual environment
# Windows
venv\Scripts\activate
# Linux/Mac
source venv/bin/activate# Install all dependencies
pip install -r requirements.txt
# For development dependencies
pip install -r requirements-dev.txt# Windows
setup.bat
# Linux/Mac
./setup.shai-ml-projects-docker-kubernetes/
├── 🏥 health_model/ # Health prediction system
│ ├── config/
│ │ └── config.py # Model configuration
│ ├── data/
│ │ ├── diabetes.csv # Diabetes dataset
│ │ └── heart_disease.csv # Heart disease dataset
│ ├── models/
│ │ ├── model.py # PyTorch model architecture
│ │ └── advanced_models.py # Advanced model variants
│ ├── src/
│ │ ├── app.py # Streamlit web application
│ │ ├── data_processor.py # Data preprocessing
│ │ ├── trainer.py # Training pipeline
│ │ └── main.py # Main training script
│ ├── utils/
│ │ └── visualization.py # Plotting utilities
│ └── requirements.txt # Health model dependencies
│
├── 🐱🐶 src/ # Cat & Dog classifier (main)
│ ├── model.py # TensorFlow model architectures
│ ├── train.py # Training pipeline
│ ├── predict.py # Prediction interface
│ ├── data_loader.py # Data handling
│ ├── realtime_detection.py # Webcam detection
│ └── ensemble_model.py # Model ensemble
│
├── 🎬 imdb_sentiment/ # Sentiment analysis
│ ├── src/
│ │ ├── model.py # Bidirectional LSTM model
│ │ ├── train.py # Training script
│ │ ├── predict.py # Prediction interface
│ │ └── data_loader.py # Text preprocessing
│ └── requirements.txt # IMDB model dependencies
│
├── 🐳 k8s/ # Kubernetes deployment
│ ├── deployment.yaml # K8s deployment config
│ ├── service.yaml # K8s service config
│ └── pvc.yaml # Persistent volume claims
│
├── 📊 monitoring/ # Monitoring setup
│ └── prometheus.yml # Prometheus configuration
│
├── 📁 data/ # Training data
│ ├── cat/ # Cat images
│ └── dog/ # Dog images
│
├── 🔧 Configuration Files
│ ├── docker-compose.yml # Multi-service deployment
│ ├── Dockerfile # Container configuration
│ ├── requirements.txt # Main dependencies
│ └── project_config.py # Global configuration
│
├── 🚀 Execution Scripts
│ ├── run_all.py # Master orchestrator
│ ├── run_health_app.py # Health model launcher
│ ├── run_simple.py # Simple classifier
│ ├── run_advanced.py # Advanced classifier
│ └── menu.py # Interactive menu
│
└── 📋 Documentation
├── README.md # This file
└── LICENSE # MIT License
# Master orchestrator - runs all services
python run_all.py
# Windows batch file
run_all.bat
# Docker Compose (all services)
docker-compose up --build# Streamlit web application (Port: 8501)
python run_health_app.py
# or
streamlit run health_model/src/app.py
# Direct training
python health_model/src/main.py
# Access: http://localhost:8501Features Available:
- 📊 Real-time health dashboard
- 🤖 AI-powered health chatbot (OpenAI + Gemini)
- 📈 Interactive prediction charts
- 📋 Batch CSV upload and prediction
- 📱 Real-time health monitoring
# Interactive menu system
python menu.py
# Simple classifier
python run_simple.py
# Advanced multi-model classifier
python run_advanced.py
# Real-time webcam detection
python src/realtime_detection.py
# Gradio web interface (Port: 7860)
python src/predict.pyAvailable Models:
- 🔥 EfficientNetB0 (Transfer Learning)
- 🏗️ ResNet50V2 (Deep Residual)
- 🧠 Custom CNN (Lightweight)
- 🎯 Ensemble Model (Best Performance)
# Download data and train
python imdb_sentiment/run.py --download --train
# Train with custom parameters
python imdb_sentiment/src/train.py --epochs 15 --batch_size 64
# Single prediction
python imdb_sentiment/src/predict.py --text "Great movie!"
# Batch prediction
python imdb_sentiment/src/predict.py --input_file reviews.csvAdvanced health monitoring with AI-powered predictions and real-time dashboard
- 🧠 Architecture: PyTorch-based neural network with attention mechanism
- 📊 Features: Real-time monitoring, predictive analytics, risk assessment
- 🌐 Interface: Streamlit web app with interactive dashboards
- 🤖 AI Integration: OpenAI GPT-3.5 and Google Gemini chatbots
- 📈 Analytics: Advanced visualization with Plotly charts
- 🎯 Datasets: Diabetes and heart disease prediction
Key Capabilities:
- Real-time health metrics simulation
- Interactive prediction history
- Feature importance analysis
- Confidence scoring and visualization
- CSV batch processing
- AI-powered health consultation
Technical Stack:
# Core: PyTorch, Streamlit, Plotly
# AI APIs: OpenAI, Google Gemini
# Data: Pandas, NumPy, Scikit-learn
# Visualization: Matplotlib, Seaborn, PlotlyMulti-architecture computer vision system with real-time detection
- 🏗️ Models: EfficientNetB0, ResNet50V2, Custom CNN, Ensemble
- 📷 Input: Images, webcam feed, batch processing
- ⚡ Performance: Transfer learning with fine-tuning
- 🔄 Training: Data augmentation, callbacks, model checkpointing
- 📱 Deployment: Gradio web interface, real-time webcam
Advanced Features:
- Multiple model architectures comparison
- Real-time webcam detection with OpenCV
- Interactive menu system for easy navigation
- Ensemble model for improved accuracy
- Training history visualization
- Model performance evaluation
Technical Stack:
# Core: TensorFlow/Keras, OpenCV
# Models: EfficientNet, ResNet, Custom CNN
# Interface: Gradio, Matplotlib
# Data: PIL, NumPy, Data AugmentationNatural Language Processing for movie review classification
- 🧠 Architecture: Bidirectional LSTM with embedding layers
- 📝 Processing: Advanced text preprocessing with NLTK
- 🎯 Performance: Binary classification (positive/negative)
- 🔄 Training: Early stopping, model checkpointing
- 📊 Analysis: Comprehensive evaluation metrics
NLP Features:
- Bidirectional LSTM for context understanding
- Word embedding with trainable layers
- Text preprocessing and tokenization
- Dropout layers for regularization
- Model evaluation with accuracy metrics
- Batch and single text prediction
Technical Stack:
# Core: TensorFlow/Keras, NLTK
# Model: Bidirectional LSTM, Embedding
# Data: Pandas, NLTK, Scikit-learn
# Evaluation: Matplotlib, SeabornMulti-Service Setup:
# Build and run all services
docker-compose up --build
# Run in background
docker-compose up -d
# View logs
docker-compose logs -fServices Included:
- AI Agent: Main application (Ports: 8501, 7860)
- Prometheus: Monitoring (Port: 9090)
- Grafana: Visualization (Port: 3000)
Individual Container:
# Build custom image
docker build -t ai-agents .
# Run with port mapping
docker run -p 8501:8501 -p 7860:7860 ai-agentsDeploy to K8s Cluster:
# Apply all configurations
kubectl apply -f k8s/
# Check deployment status
kubectl get pods -l app=ai-agent
# View logs
kubectl logs -l app=ai-agent -f
# Port forwarding for local access
kubectl port-forward service/ai-agent-service 8501:8501K8s Resources:
- Deployment: Multi-replica application deployment
- Service: Load balancer for external access
- PVC: Persistent storage for data, models, results
- Secrets: API keys and sensitive configuration
# System status monitoring
python monitor_status.py
# Service health checks
curl http://localhost:8501/ # Streamlit health
curl http://localhost:7860/ # Gradio health# Run all tests
pytest health_model/tests/ -v
# Model-specific tests
python health_model/tests/test_models.py
python health_model/tests/test_data_generator.py
# Performance testing
python src/test_models.py- Application Logs: Structured logging with timestamps
- Performance Metrics: Real-time system monitoring
- Error Tracking: Comprehensive error handling
- Status Dashboard: Live service status updates
We welcome contributions! Please follow these steps:
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
- Follow PEP 8 style guide
- Add tests for new features
- Update documentation
- Ensure all tests pass
- Use meaningful commit messages
- Keep models in respective
models/directories - Add configuration in
config/folders - Place utilities in
utils/directories - Update requirements.txt for new dependencies
This project is licensed under the MIT License - see the LICENSE file for details.
Mallelea Kranthi Kiran
- 🌐 Portfolio: [Your Portfolio URL]
- 💼 LinkedIn: [Your LinkedIn Profile]
- 📧 Email: [Your Email]
- 🐙 GitHub: [Your GitHub Profile]
- TensorFlow Team - Deep learning framework
- PyTorch Team - Neural network library
- Streamlit - Web interface framework
- Gradio - ML model interfaces
- OpenAI & Google - AI API services
- IMDB - Movie review dataset
- Kaggle Community - Datasets and inspiration
- Open Source Community - Various libraries and tools
⭐ Star this repository if you find it helpful! ⭐
📧 Questions? Feel free to open an issue or contact the author.
🚀 Ready to deploy? Check out our Docker and Kubernetes configurations!