π§ Detect emotions from user input and generate emotionally aligned responses using cutting-edge NLP models!
- π Emotion Detection using XLM-RoBERTa fine-tuned on the GoEmotions dataset
- π Multilingual support (even though the dataset is English-only, the model understands other languages!)
- π¬ Text & Voice Input
- π Text-to-Speech (TTS) for bot responses
- π¨ Dark mode toggle
- π± Frontend built with HTML/CSS/JS, powered by Flask backend
- π Emotion support system to help users cope emotionally
- π§ Integrates Gemini API for smart and human-like text generation
EmoBot/
β
βββ app.py # Flask backend
βββ requirements.txt # Python dependencies
βββ README.md # You're reading it!
β
βββ static/
β βββ css/ # Styling (home, chat, etc.)
β βββ js/ # Frontend logic (TTS, dark mode, etc.)
β βββ models/
β βββ xlm-roberta_emotion_model/ # Emotion detection model (handled via Git LFS)
β
βββ templates/ # HTML pages (chat, home, error pages)
βββ ...
| Layer | Tech |
|---|---|
| Backend | Python, Flask |
| Frontend | HTML, CSS, JavaScript |
| NLP Model | XLM-RoBERTa + GoEmotions |
| AI Gen API | Gemini |
| Voice | Web Speech API (JS) |
The xlm-roberta_emotion_model folder contains:
model.safetensorsβ π Fine-tuned model (1.1 GB, tracked with Git LFS)config.json,tokenizer_config.json,sentencepiece.bpe.modelβ π¦ Supporting files
π£ Note: Although the model was trained on an English dataset, using XLM-RoBERTa allows emotion detection in multiple languages. π¬π
- Clone this repo:
git clone https://github.com/anVSS1/EmoBot.git
cd EmoBot- Install dependencies:
pip install -r requirements.txt- Make sure Git LFS is installed and pull model weights:
git lfs install
git lfs pull- Run the app:
python app.pyThen head to http://localhost:5000 and start chatting π
Coming soon...
Built by Anass Ouzaouit β Master's student in BI & Big Data, passionate about AI and NLP π₯
Feel free to connect or give a β if you like the project!
MIT License