π§ Personality Predictor - AI Model
A machine learning application that predicts personality types (Introvert/Extrovert) based on behavioral patterns with 96.9% accuracy.
π Live Application
π Try the Live App
Note: The web application is now live at the root URL above. Click the link to access the interactive personality predictor!
β¨ Features
- π€ AI-Powered: 96.9% accurate personality prediction
- π Beautiful UI: Modern, responsive design
- π± Mobile Friendly: Works on all devices
- β‘ Real-time: Instant predictions with confidence scores
- π Insights: Detailed personality trait explanations
- π Privacy: No data storage, all processing is local
π― How It Works
The application analyzes 7 key behavioral patterns:
- Time Spent Alone (hours per day)
- Social Event Attendance (per month)
- Going Outside (times per week)
- Friends Circle Size
- Post Frequency (per week)
- Stage Fear (Yes/No)
- Drained After Socializing (Yes/No)
Based on these inputs, the AI model predicts whether youβre an Introvert or Extrovert with a confidence score.
π Quick Start
Option 1: Use the Live App
Simply visit https://samuux23.github.io/CI_project/ and start predicting!
Option 2: Run Locally
- Clone the repository
git clone https://github.com/Samuux23/CI_project.git
cd CI_project
- Static HTML App (Recommended)
- Open
webapp/index.html
in your web browser
- No server setup required!
- Flask App (Single File)
cd webapp
pip install -r requirements_single_app.txt
python personality_predictor_app.py
# Open: http://localhost:5000
- Windows Quick Start
- Double-click
webapp/start_app.bat
- Algorithm: Gradient Boosting Classifier
- Accuracy: 96.9%
- Training Data: 18,526 samples
- Features: 7 behavioral patterns
- Classes: Introvert (0), Extrovert (1)
ποΈ Project Structure
CIS_6005/
βββ backend/ # π§ Backend API Services
β βββ main.py # FastAPI backend server
β βββ requirements.txt # Backend dependencies
β βββ requirements_simple.txt # Simplified dependencies
βββ frontend/ # π¨ React Frontend Application
β βββ package.json # Node.js dependencies
β βββ public/ # Static assets
β βββ src/ # React source code
βββ webapp/ # π Web Applications Folder
β βββ index.html # Static web app (GitHub Pages)
β βββ personality_predictor_app.py # Flask version (single file)
β βββ README.md # Web app documentation
βββ Final_Code.py # π§ Complete ML Pipeline
βββ requirements.txt # Python dependencies
βββ best_comprehensive_model.pkl # Trained model
βββ preprocessor_comprehensive.pkl # Data preprocessor
βββ train.csv # Training dataset
βββ test.csv # Test dataset
βββ README.md # This file
βββ .github/workflows/ # GitHub Actions
βββ streamlit-deploy.yml # Deployment workflow
π¨ Technologies Used
- Frontend: HTML, CSS, JavaScript (GitHub Pages)
- Alternative: Streamlit, Python, scikit-learn
- ML Model: Gradient Boosting Classifier
- Deployment: GitHub Pages, Streamlit Cloud
- Styling: Custom CSS with gradients
π Model Training
The model was trained using:
- Hyperparameter Optimization: Comprehensive grid search
- Feature Engineering: Advanced preprocessing pipeline
- Cross-validation: 5-fold CV for robust evaluation
- Ensemble Methods: Multiple algorithms tested
π§ Development
π Web Applications (in webapp/
folder)
π Detailed Documentation: See webapp/README.md
for comprehensive guide
Static Version (Recommended for GitHub Pages)
The webapp/index.html
file contains a complete static version that:
- β
Works without any server setup
- β
Runs entirely in the browser
- β
Uses JavaScript-based prediction logic
- β
Maintains the same beautiful UI
- β
Provides instant results
Flask Version (Single File)
The webapp/personality_predictor_app.py
provides:
- β
Complete Flask backend + HTML frontend
- β
Uses actual trained ML model
- β
Easy local deployment
- β
Single file solution
π Deployment
GitHub Pages (Current)
- URL: https://samuux23.github.io/CI_project/
- Type: Static HTML/CSS/JavaScript
- Status: β
Live and working
Streamlit Cloud (Alternative)
- URL: https://personality-predictor.streamlit.app
- Type: Full ML model deployment
- Status: Available for advanced users
π Usage Examples
Extrovert Pattern
- Time alone: 1-2 hours
- Social events: 8+ per month
- Going outside: 6+ times per week
- Friends: 12+ people
- Posts: 5+ per week
- Stage fear: No
- Drained: No
Introvert Pattern
- Time alone: 6+ hours
- Social events: 2-3 per month
- Going outside: 2-3 times per week
- Friends: 2-5 people
- Posts: 1-2 per week
- Stage fear: Yes
- Drained: Yes
π€ Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
π License
This project is open source and available under the MIT License.
π Acknowledgments
- Built with modern web technologies
- Powered by machine learning algorithms
- Deployed on GitHub Pages for easy access
π― Ready to discover your personality type? Click here to start!