CustEmotiTrack is an AI-powered Customer Emotion Analysis System designed to analyze and categorize customer feedback efficiently. It leverages Machine Learning (ML), NLP, and FAISS-based similarity retrieval to extract emotions, detect hierarchical topics, and compute sentiment scores.
✅ Emotion Detection: Extracts user emotions using DistilBERT embeddings and FAISS-based similarity search.
✅ Topic & Subtopic Recognition: Hierarchical topic modeling with MiniLM L6 Sentence Transformer.
✅ Adorescore Computation: Weighs sentiment intensities and computes an engagement score between -100 to 100.
✅ Multilingual Support: Google Translate API enhances cross-language compatibility.
✅ Streamlit UI: Real-time feedback analysis with an interactive web interface.
The architecture consists of several core components:
- 🎯 Data Preprocessing Module: Cleans, normalizes, and balances customer feedback.
- 🎭 Emotion Detection Module: DistilBERT embeddings + FAISS HNSW similarity search.
- 🕵️ Topic & Subtopic Recognition: MiniLM embeddings with cosine similarity mapping.
- 🌐 Multilingual Processing: Google Translate API for cross-language support.
- 📊 Adorescore Computation: Sentiment intensity with topic-weighted scoring.
- 🎨 Streamlit-based UI: Provides real-time analysis and data visualization.
- Emotion Classification: DistilBERT (base-uncased-go-emotions) + FAISS HNSW retrieval.
- Topic Modeling: MiniLM L6 Transformer embeddings with cosine similarity-based clustering.
- Sentiment Quantification: Intensity scaling with topic-relevant weight adjustments.
- Input: Raw customer feedback.
- Processing:
- Emotion extraction
- Topic detection
- Sentiment computation
- Output: JSON response with detected emotions, topics, and computed Adorescore.
- User Input: Feedback received via Streamlit UI or API.
- Preprocessing: Text cleaning, tokenization, and normalization.
- Feature Extraction:
- DistilBERT embeddings for emotion detection
- MiniLM embeddings for topic recognition
- Classification:
- Emotion: FAISS HNSW similarity search.
- Topics: Cosine similarity clustering.
- Sentiment Scoring: Intensity scaling weighted by topic impact.
- Output Generation: JSON response for UI or downstream applications.
- 📂 CustEmotiTrack
- 📂 config/
- 📂 datasets/ (Raw & Processed Data)
- 📂 evaluation/ (scripts)
evaluate_emotions.pyevaluate_topic.py
- 📂models/ (Trained ML Models)
emotion_model.pttopic_model.pkl- tokenizer/
load_model.py(emotion module)load_topic_model.py(topic module)save_model.pysave_topic_model.py
- 📂streamlit_app/ (Frontend UI)
app.py
gdrive_auth.pyREADME.mdrequirements.txt(Dependencies)LICENSE
- Endpoint:
/predict-emotion - Input:
{
"feedback": "The product quality is amazing!"
}- Processing:
- DistilBERT feature extraction
- FAISS HNSW similarity classification
- Output:
{
"emotions": [{"joy": 0.92}, {"admiration": 0.85}],
"confidence": 0.95
}- Endpoint:
/predict-topic - Input:
{
"feedback": "The delivery was very fast and free!"
}- Processing:
- MiniLM embeddings
- Cosine similarity for topic and subtopic mapping
- Output:
{
"topic": "Delivery",
"subtopic": "Fast Shipping",
"relevance": 0.88
}- Endpoint:
/compute-adorescore - Input:
{
"emotions": [{"joy": 0.92}, {"admiration": 0.85}],
"topics": [{"Delivery": 0.88}]
}- Processing: Weighted sentiment scoring.
- Output:
{
"Adorescore": 75.4
}- FAISS-based retrieval enhances classification speed over deep neural models.
- Hybrid feature extraction embeddings boost classification accuracy.
- Google Translate API provides fast multilingual support but lacks contextual depth.
- Hybrid FAISS + Transformer Classification: Combine retrieval search with neural models for improved results.
- Advanced Topic Modeling: Expand topic granularity using hierarchical clustering.
- Contextual Sentiment Weighting: Enhance Adorescore calculations by dynamically adjusting sentiment intensities.
- CPU: Intel i5/i7 or AMD Ryzen 5/7 for local inference.
- GPU: NVIDIA RTX 2060 or higher for model training.
- RAM: Minimum 16GB for processing.
- Storage: SSD with at least 50GB free space.
- Python: 3.8+
- Libraries: PyTorch, FAISS, Hugging Face Transformers, Scikit-Learn, NLTK.
- Cloud Services:
- Google Firebase (Data Storage)
- Google Translate API (Multilingual Support)
- Version Control: GitHub for code and dataset versioning.
# Navigate to the project directory
cd CustEmotiTrack
# Install dependencies
pip install -r requirements.txt
# Save emotion and topic models
python models/save_model.py
python models/save_topic_model.py
# Load trained models
python models/load_model.py
python models/load_topic_model.py
# Run Streamlit app
streamlit run streamlit_app/app.pyCheckout the following images in project folder 'output' for reference:






