File size: 1,532 Bytes
bfd46d4
cbefbc7
 
 
 
 
3ba637f
bfd46d4
 
caeaafe
bfd46d4
 
cbefbc7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
title: Empathetic Chatbot
emoji: 💬
colorFrom: blue
colorTo: purple
sdk: streamlit
sdk_version: 1.49.1
app_file: app.py
pinned: false
license: mit
---

# Emotion-Aware Empathetic Chatbot

An AI-powered chatbot that detects emotions from user messages and provides empathetic responses using advanced NLP techniques.

## Features

- **Real-time Emotion Detection**: Uses DistilBERT to identify emotions from text
- **RAG System**: Retrieval-Augmented Generation for contextual responses
- **Empathetic Responses**: Tailored responses based on detected emotions
- **Interactive Chat Interface**: Clean, user-friendly Streamlit interface
- **Emotion Analytics**: Track emotion patterns over conversation history

## How it Works

1. **Emotion Detection**: Analyzes user input to detect emotions (anger, joy, sadness, optimism)
2. **Template Retrieval**: Uses FAISS vector search to find relevant response templates
3. **Response Generation**: Combines emotion-aware templates with empathetic base responses
4. **Context Awareness**: Maintains conversation history for better responses

## Technologies Used

- **Streamlit**: Web application framework
- **Transformers**: Emotion detection model (DistilBERT)
- **Sentence Transformers**: Text embeddings for similarity search
- **FAISS**: Vector similarity search
- **Datasets**: Emotion dataset from Cardiff NLP

## Disclaimer

This is an automated chatbot designed for emotional support. For serious mental health concerns, please consult a qualified mental health professional.