We are using emotion detection in chat to create a more robust and interactive chat experience for the user, with the underlying goal of acting essentially as an AI therapist.
The model uses an emotion classifier to classify input text emotion (by using a Text Transformer) Then, we use prompt engineering (chain-of-thought prompting) to fine tune gpt-2 to the task of offering therapeutic advice with reference to an emotion classified therapy transcript database. The response is taking in classified emotions at different weights. These weights are changed on the basis of feedback from the user after recieving the responses. This ensures that the model gives the user a personalised experience on two parameters:
- User feedback of their satisfaction with the responses
- User emotion detected by text transformer
Download the rep and run "pip install -r requirements.txt". Then go to the client folder and run "npm install" (if there is an error saying react-scripts not found when running the client run "npm install react-scripts"). Download the model from the link "https://drive.google.com/file/d/1WaYHq86ScCoHfDSDuDQ99lTDtXMIJk2d/view?usp=sharing" and paste it in the server folder.
Open two terminals. Go to the client folder in the first terminal and run "npm run start". Go to the server folder in the second terminal and run "python -m flask run".