An interactive, gamified web application that guides users through a personality quiz to recommend their top 5 career paths. This project leverages a custom-trained neural network and a local Large Language Model (Ollama) to provide personalized, insightful, and trustworthy career recommendations.
Instead of a static form, the application provides a modern, multi-step quiz experience with smooth animations and a progress tracker — making career exploration engaging and fun.
| Quiz Screen | Career Recommendation Screen |
|---|---|
![]() |
![]() |
-
🎮 Gamified Quiz Experience: Questions are presented one by one in a guided journey with animated transitions, progress bars, and a sleek modern UI.
-
🎯 Top 5 Career Recommendations: The deep learning model predicts the user's top 5 most suitable careers, along with confidence scores.
-
🤖 LLM-Powered Insights: A locally-run Ollama (Llama 3) instance generates:
- A concise description of each recommended career.
- A personalized explanation of why the career is a good fit based on the user's responses.
-
⚙️ Decoupled Architecture: A robust Flask backend serves the AI model via an API, consumed by a custom HTML, CSS, and JavaScript frontend.
-
📊 Expandable Dataset: The project includes scripts to generate a synthetic dataset covering 95 unique careers.
- Framework: Flask
- Machine Learning: TensorFlow (Keras)
- Data Handling: Pandas, NumPy, Scikit-learn
- LLM Integration: Ollama (via REST API using
requests)
- Structure: HTML5
- Styling & Animations: CSS3
- Logic & API Calls: JavaScript (ES6+)
- Dataset: Synthetic dataset (
career_prediction_dataset.csv) generated via Python scripts.
- Python (>= 3.9)
- Ollama (installed and running locally)
Install Ollama from ollama.com, then pull and run the model:
ollama run llama3Keep this terminal open while running the app.
https://github.com/AyushDineshRathi/Personality-based-Career-Prediction.gitIt’s recommended to use a virtual environment.
# Create a virtual environment
python -m venv venv
# Activate it
# On Windows:
venv\Scripts\activate
# On macOS/Linux:
source venv/bin/activate
# Install dependencies
pip install -r requirements.txtIf requirements.txt doesn’t exist yet, create it by running:
pip freeze > requirements.txtOr manually include:
flask
tensorflow
joblib
numpy
scikit-learn
pandas
flask-cors
requests
The trained model files (.h5, .gz) are not included in the repository.
Generate them using the training script:
Run the career.ipynb fileAfter successful training, you should see:
career_prediction_model.h5
scaler.gz
label_encoder.gz
Start the Flask backend (ensure Ollama is running):
python app.pyThe server will start on:
http://127.0.0.1:5000/
Open this URL in your browser to interact with the quiz.
-
Data Generation: Python script generates a synthetic dataset of user profiles and careers.
-
Model Training: Deep learning model learns patterns between personality traits and career outcomes.
-
Backend API: Flask loads the trained model and serves predictions via REST endpoints.
-
Gamified Frontend: JavaScript frontend presents a multi-step quiz with animations and collects responses.
-
LLM Enrichment: Backend queries Ollama for insightful, personalized career explanations.
-
Interactive Results: Frontend displays top 5 career matches in an expandable, dynamic interface.

