This project implements an emotion prediction system using natural language processing (NLP) to predict emotions from text input. The model is based on a logistic regression classifier and uses a TF-IDF vectorizer for text feature extraction. The system processes English text input and classifies it into one of three main emotion categories: Positive, Negative, and Neutral.
The model achieved an accuracy of 57.075% on the test dataset. The accuracy is moderate, as the model is still in the early stages of development and was trained with basic parameters.
The dataset used for training is from Emotion Detection from Text.
Here is an example of how the system works:
- The user enters a text such as "How cute you are"
- The model predicts the emotion as Positive.
-
Clone or download this repository.
git clone https://github.com/pathanin-kht/EmotionDetectionFromText.git
-
Install the required dependencies.
pip install -r requirements.txt
-
Download Emotion Detection from Text and place it in the same directory as the script, or update the dataset path in the code.
-
Run the model.
python emotion_train_model.py
-
Start the server
python app.py
-
Open your browser and navigate to your localhost.
This project is licensed under the MIT License - see the LICENSE file for details.
For feedback or inquiries, feel free to reach out via [email protected].