Skip to content

Latest commit

ย 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ“ฑ Instagram Engagement AI Predictor

๐Ÿš€ AI-Powered Instagram Engagement Prediction using Machine Learning, Streamlit & Google Gemini

Python LightGBM Streamlit Google Gemini Plotly Status

Predict Instagram user engagement using Machine Learning, advanced feature engineering, lifestyle analytics, and an AI-powered recommendation assistant.


๐Ÿ“Œ Project Overview

Instagram engagement depends on multiple lifestyle, behavioral, and social media factors. Instead of relying only on follower count or likes, this project combines health metrics, activity patterns, lifestyle habits, and Instagram usage statistics to predict whether a user's engagement level is Low, Medium, or High.

The project also includes a modern Streamlit dashboard and an AI assistant powered by Google Gemini that provides personalized creator growth recommendations.


๐ŸŽฏ Objectives

  • Predict Instagram engagement level.
  • Analyze user lifestyle and social media behavior.
  • Build a production-ready Machine Learning model.
  • Deploy an interactive Streamlit dashboard.
  • Generate personalized AI-powered creator advice.

๐Ÿ“‚ Dataset

The dataset contains Instagram usage statistics together with user lifestyle and health information.

Features Include

  • User demographics
  • Followers & Following
  • Instagram activity
  • Reels and Stories usage
  • Physical activity
  • Sleep patterns
  • BMI
  • Blood pressure
  • Diet quality
  • Stress and happiness scores
  • Social interactions
  • Privacy settings
  • Premium subscription status

Target Variable:

Engagement Level

  • ๐Ÿ”ด Low
  • ๐ŸŸก Medium
  • ๐ŸŸข High

๐Ÿ›  Tech Stack

Programming

  • Python

Data Processing

  • Pandas
  • NumPy

Machine Learning

  • LightGBM
  • Scikit-learn

Visualization

  • Plotly
  • Matplotlib
  • Seaborn

Deployment

  • Streamlit

AI Integration

  • Google Gemini API

Model Storage

  • Joblib

โš™๏ธ Machine Learning Pipeline

Dataset
    โ”‚
    โ–ผ
Data Cleaning
    โ”‚
    โ–ผ
Feature Engineering
    โ”‚
    โ–ผ
Encoding
    โ”‚
    โ–ผ
Log Transformation
    โ”‚
    โ–ผ
Train-Test Split
    โ”‚
    โ–ผ
LightGBM Training
    โ”‚
    โ–ผ
Model Evaluation
    โ”‚
    โ–ผ
Model Saving
    โ”‚
    โ–ผ
Streamlit Deployment
    โ”‚
    โ–ผ
Google Gemini AI Assistant

๐Ÿง  Feature Engineering

Several custom features were created to improve predictive performance.

Lifestyle Features

  • Sleep Category
  • BMI Category
  • Blood Pressure Category
  • Health Index
  • Activity Ratio
  • Activity Efficiency

Social Features

  • Follower Ratio
  • Social Score
  • Social Activity
  • Life Balance

Data Transformations

  • Log transformation for highly skewed variables
  • One-Hot Encoding
  • Ordinal Encoding
  • Binary Encoding
  • Leakage feature removal

๐Ÿค– Machine Learning Model

Model Used:

โœ… LightGBM Classifier

Configuration

  • 300 Estimators
  • Learning Rate = 0.05
  • Max Depth = 8
  • Num Leaves = 31

Evaluation Metrics

  • Accuracy
  • Classification Report
  • Confusion Matrix
  • Train Accuracy
  • Test Accuracy

๐ŸŒ Streamlit Dashboard

The project includes an interactive web application where users can:

  • Adjust creator profile information.
  • Predict engagement level instantly.
  • View engagement probabilities.
  • Explore interactive charts.
  • Analyze creator metrics.
  • Receive AI-powered growth suggestions using Google Gemini.

๐Ÿ“Š Dashboard Features

  • ๐Ÿ“ˆ Engagement Probability Chart
  • ๐Ÿ“Š Creator Analytics Cards
  • ๐Ÿ“‰ Radar Chart
  • ๐Ÿค– AI Prediction Panel
  • ๐Ÿ’ก Personalized AI Creator Assistant
  • ๐ŸŒ™ Modern Dark Theme UI

๐Ÿ“ Repository Structure

Instagram-Engagement-AI
โ”‚
โ”œโ”€โ”€ app.py
โ”œโ”€โ”€ model.pkl
โ”œโ”€โ”€ model_columns.pkl
โ”œโ”€โ”€ style.css
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ instagram_usage_lifestyle.csv
โ”œโ”€โ”€ notebook.ipynb
โ”œโ”€โ”€ README.md
โ””โ”€โ”€ images/

๐Ÿš€ Installation

Clone Repository

git clone https://github.com/yourusername/Instagram-Engagement-AI.git

Install Dependencies

pip install -r requirements.txt

Run Application

streamlit run app.py

๐Ÿ’ป AI Features

The application integrates Google Gemini to provide:

  • Personalized Instagram growth strategies.
  • Engagement improvement recommendations.
  • Creator performance insights.
  • AI-generated answers to user questions.

๐Ÿ“ˆ Key Features

  • End-to-End Machine Learning Pipeline
  • Advanced Feature Engineering
  • LightGBM Classification Model
  • Interactive Streamlit Dashboard
  • Plotly Visualizations
  • AI Creator Assistant
  • Real-time Engagement Prediction
  • Professional Dark Theme Interface

๐Ÿ”ฎ Future Improvements

  • Deep Learning Models
  • SHAP Explainability
  • User Authentication
  • Cloud Deployment
  • Instagram API Integration
  • Automated Retraining Pipeline

๐Ÿ™ Acknowledgements

Special thanks to the open-source community and the developers of:

  • Streamlit
  • Scikit-learn
  • LightGBM
  • Plotly
  • Google Gemini API
  • Pandas
  • NumPy

Their tools made the development of this project possible.


โญ If you found this project useful, please consider giving it a Star!

About

Machine Learning project to predict Instagram user engagement using LightGBM and feature engineering.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages