Inspiration
The inspiration for this project stemmed from the desire to leverage modern day technology to promote mental well-being and emotional balance in a digital age. With the increasing use of online platforms, we saw an opportunity to create a solution that can provide users with insights into their mental health through real-time analysis of their messages. By utilizing machine learning models to detect emotions, toxicity, and other psychological indicators, we aim to offer users valuable feedback and support for their mental health journey.
What it does
The bot analyzes the messages of users on a Discord server or our very own chatbot to provide real-time feedback on their emotional state and mental well-being. Furthermore, you may chat with the chatbot regarding anything and using machine learning algorithms the chat bot is able to figure out your mood and answer accordingly. It utilizes machine learning models to detect various emotions such as anger, anxiety, sadness, and other toxic behaviors like threats, obscenities, and insults. The bot maintains a database of user interactions, generating personalized reports that include mood ratings, positivity scores, and personality assessments. This feedback can help users become more aware of their emotional health and make positive changes.
How we built it
We built the chatbot using node js and express as a web application people can login to and communicate with for a short 15-20 minutes a day when they are free. On the other hand we built the discord bot using Python and the discord.py library to interact with Discord's API. The bot communicates with external machine learning models hosted on cloud servers(by us) using ngrok to analyze text input for emotional and toxic content. These models are accessed via REST APIs. We used requests to handle HTTP requests and aiofiles for asynchronous file operations to manage the user database efficiently. We tried to handle our problems slowly and steadily and diversify our work to play to each of our strengths.
Challenges we ran into
One of the main challenges was ensuring accurate and efficient communication with the external machine learning models. We faced many difficulties with the embed feature for getting reports after the user asks for them as well as linking and receiving the data from the api to the discord bot reports. Another challenge was managing the diverse range of potential responses from the APIs and ensuring that the web app chatbot could handle unexpected formats or errors gracefully. Lastly the report feature was also an issue since we had to figure out how to code an efficient storage solution is such less time.
Accomplishments that we're proud of
We are proud of successfully integrating multiple machine learning models into a Discord bot as well as a web app in less than 30 hours especially since it can provide meaningful and actionable insights into users' emotional health. The real-time analysis and feedback system is certainly a significant achievement, as it offers immediate support to users based on their interactions. We are also very proud of the bot's ability to maintain a comprehensive user database and generate detailed reports that users can reference to track their mental health over time.
What we learned Throughout the development process, we learned a great deal about asynchronous programming in Python, particularly with handling file operations and API requests. We gained experience in integrating machine learning models into a functional application and learned how to manage and process JSON data effectively. Additionally, we improved our understanding of the importance of error handling and logging to ensure the bot's reliability and usability. Further more we gained a lot of information regarding the complex human mind and how its very hard for AI to be able to completely predict a humans emotion or sentiments.
What's next for MyndCompanion
Looking forward, we plan to expand the bot's capabilities by integrating more advanced machine learning models to cover a broader range of psychological indicators. We aim to develop a more sophisticated user interface within Discord, including interactive elements like buttons and menus to enhance user engagement. We also plan to implement more comprehensive data privacy measures to ensure user information is handled securely. Finally, we hope to collaborate with mental health professionals to refine the bot's feedback mechanisms and provide more targeted support to users. For the website, we plan on adding a better report system which gives a comprehensive report every week/month as well as tells you ways to better yourself and improve.
Log in or sign up for Devpost to join the conversation.