The GenAI Factory Control Tower is an end-to-end, distributed cloud data pipeline and predictive maintenance dashboard. It simulates real-time IoT sensor telemetry from a factory floor, streams the data into an enterprise data warehouse, and uses Machine Learning and Generative AI to predict equipment failures before they happen.
This project demonstrates the complete lifecycle of enterprise data engineering, machine learning deployment, and agentic AI integration.
- The Factory Floor (Local Generator): A Python microservice continuously generates synthetic IoT sensor data (Temperature, Vibration, Pressure) for 50 factory machines.
- The Data Pipeline (ETL): Automated scripts push this streaming telemetry data into Google BigQuery in real-time.
- The Nervous System (Microservice Alerts): A local agent continuously scans the data stream. If a machine's current state breaches critical thermal thresholds (e.g., > 120°C), it triggers a localized
smtplibprotocol to send real-time email warnings to the shift manager. - The Brain (Predictive ML): A pre-trained Machine Learning model (
scikit-learn) calculates a real-time "Health Score" for each machine based on historical failure patterns. - The Control Tower (Streamlit Cloud): A globally accessible web application visualizes the BigQuery database in real-time.
- The AI Agent (LangChain + Groq): A built-in LLM interface translates natural language questions (e.g., "Which machines are currently at risk?") into SQL queries, executes them against BigQuery, and returns human-readable insights.
- Cloud & Database: Google Cloud Platform (GCP), BigQuery
- Frontend / Hosting: Streamlit, Streamlit Community Cloud
- AI & LLM: LangChain, Groq API, Llama-3
- Machine Learning: Scikit-Learn, Joblib, Pandas
- Automation: Python
subprocess,smtplib
- Real-Time Database Syncing: Dashboard reflects live changes as the local generator pumps data to the cloud.
- Agentic Alerting: Intelligent threshold monitoring that actively emails stakeholders during critical anomalies.
- Natural Language Database Querying: Bypasses the need for SQL knowledge by letting users "talk" directly to the factory floor using LLMs.
- Secure Cloud Secrets Management: Robust handling of GCP Service Accounts and API keys via Streamlit's encrypted secrets.
To wake up the factory floor and start pumping data to the cloud dashboard:
- Clone this repository.
- Install the required dependencies:
pip install -r requirements.txt