## Inspiration

Studies approximate that 1 in 5 American adults suffer from a mental illness each year. In addition, nearly half of those who do suffer from mental illnesses don't seek treatment or help. As university students, friends, and family members, we've seen how mental health has the ability to impact social, academic and work lives. Therefore, we wanted to create a tool that leverages existing mental health survey data in order to promote awareness of mental health issues and encourage companies and organizations to invest in the mental well being of their employees.

## What it does

Our application is intended for employers and organizations to see how aware their policies and culture is of mental illnesses within the workplace. User would need to fill out a short survey on some characteristics of their company or organization such as the number of employees, location, mental health programs, health benefits and ease to get help. Peace of Mind uses this data and compares it historical mental health survey data in order to assign the user's organization a mental health awareness score. This score would be accompanies with research backed suggestions on what they could implement within the organization to raise the score or what they should continue to pursue in order to make sure that the workplace is a healthy environment for their employees. We wanted to show that companies have a lot to gain, economically and ethically, by having healthy, happy, and productive employees in their offices. Therefore, today employees should be able to count on their employers' support as they face mental health illnesses.

## How we built it

We got our data from a public mental health survey that 2014 and 2016. We then cleaned and prepared this data in Microsoft Excel. Then we used Microsoft Azure Machine Learning Studio in order to construct our model to predict how likely a company may be contributing to the mental health illnesses of their employees. Tuning our model involved considerations of which column of data would be important to this final prediction. For example, companies and organizations with mental health benefits and a wellness program that educated employees about mental health services would be more likely to have their employees seek help and recover quicker. We then built a web application using html/css/javascript that acted as an interface to inform visiting users about mental health statistics, calculate a mental health awareness score based on a short survey, and give a little background on the research that supports the score. The application was deployed using Microsoft Azure.

## Challenges we ran into

We ran into challenges with integrating our web service model with our web application through http requests. This was due to Microsoft Azure Machine Learning Studio needing a workaround to send http requests by using a python script or wrapping in another API. Therefore, we did not have enough time to create a full flow on the application and work on the interface for the survey entry and about portions of the web page.

## Accomplishments that we're proud of

We are proud of getting a useful model built to predict whether an employee would go seek help for a mental illness using pretty sparse mental health survey data. Our model achieved a 0.76 F1 score given less than 2000 data points with a few columns after cleaning. Given that this survey is currently being performed again in 2017, there will be even more data available in the near future to train and improve our model with.

## What we learned

This was the first machine learning project that we as individuals and as a team tackled so it was interesting to learn about the work and methods needed to clean and prepare data sets to become usable. We also learning about different machine learning algorithms and how tuning their parameters makes better models to predict our data.

## What's next for Peace of Mind

Since we have a few separate parts of our project done, the next step is to integrate all of them into a single user experience that someone would be able to use. We will also be excited to see when the mental health survey data for 2017 comes out so that there is more data to train our model. Overall, we hope that our project achieves its goal of promoting awareness for mental health and hopefully can inspire the investment in programs that can help prevent and treat mental illnesses.
## Inspiration

Meet Catherine. Recently with academic, social, and personal stress, she has relapsed back into depression. In fear of the social stigmatism of mental illnesses, she does not know whom to talk to about this and has not revealed this to anyone. She is currently fighting the battle alone.
Late night, when her depression gets the worst of her, she just needs someone to talk to at that moment.
With our app Out of My Mind, she can reach out to anyone anonymously and chat with someone who shares a similar experience and understands exactly how she feels.

## What it does

A peer-to-peer platform for those who are mentally ill or who simply need an outlet to help resolve their most current worries-- to get their worries out of their minds.

## How I built it

We used NodeJS, Bootstrap, Socket.io, and JavaScript as our back end, and HTML and CSS as our front end.

## Challenges I ran into

The learning curve was quite steep as this was a new language for all members of the team. For some, it was also the first time using Git. Hence, the starting of the app of deciding what to do and how to do it, and the wrapping up with merge conflicts in Git were both difficult to complete and overcome.

## Accomplishments that I'm proud of

We are proud of complete minimal viable product as beginners without any previous experience. We are also proud and excited that this could potentially make a significant impact to society, by resolving a common issue we see happening, even to the people around us.

## What I learned

We learned to program and connect back end services NodeJS, Bootstrap, Socket.io, and JavaScript to front end services of HTML and CSS. We learned how to work as a team in terms of communication, workflow, and Git.

## What's next for Out of my Mind

For our vision and additional features:
 -to turn our web app into an android/ios mobile app to serve a wider audience
 -to create a database of users' personal experiences and how they may or may not overcome it
 -to provide data to mental wellness organizations by keeping track of common topics among users
 -to continue connections between users by allowing them to create accounts and be able to save chat history
 -to expand the chatting feature from one-on-one chatting into multi-user chatrooms
## 💡 Inspiration 💡

Mental health is a growing concern in today's population, especially in 2023 as we're all adjusting back to civilization again as COVID-19 measures are largely lifted. With Cohere as one of our UofT Hacks X sponsors this weekend, we want to explore the growing application of natural language processing and artificial intelligence to help make mental health services more accessible. One of the main barriers for potential patients seeking mental health services is the negative stigma around therapy -- in particular, admitting our weaknesses, overcoming learned helplessness, and fearing judgement from others. Patients may also find it inconvenient to seek out therapy -- either because appointment waitlists can last several months long, therapy clinics can be quite far, or appointment times may not fit the patient's schedule. By providing an online AI consultant, we can allow users to briefly experience the process of therapy to overcome their aversion in the comfort of their own homes and under complete privacy. We are hoping that after becoming comfortable with the experience, users in need will be encouraged to actively seek mental health services!

## ❓ What it does ❓

This app is a therapy AI that generates reactive responses to the user and remembers previous information not just from the current conversation, but also past conversations with the user. Our AI allows for real-time conversation by using speech-to-text processing technology and then uses text-to-speech technology for a fluent human-like response. At the end of each conversation, the AI therapist generates an appropriate image summarizing the sentiment of the conversation to give users a method to better remember their discussion.

## 🏗️ How we built it 🏗️

We used Flask to make the API endpoints in the back-end to connect with the front-end and also save information for the current user's session, such as username and past conversations, which were stored in a SQL database. We first convert the user's speech to text and then send it to the back-end to process it using Cohere's API, which as been trained by our custom data and the user's past conversations and then sent back. We then use our text-to-speech algorithm for the AI to 'speak' to the user. Once the conversations is done, we use Cohere's API to summarize it into a suitable prompt for the DallE text-to-image API to generate an image summarizing the user's conversation for them to look back at when they want to.

## 🚧 Challenges we ran into 🚧

We faced an issue with implementing a connection from the front-end to back-end since we were facing a CORS error while transmitting the data so we had to properly validate it. Additionally, incorporating the speech-to-text technology was challenging since we had little prior experience so we had to spend development time to learn how to implement it and also format the responses properly. Lastly, it was a challenge to train the cohere response AI properly since we wanted to verify our training data was free of bias or negativity, and that we were using the results of the Cohere AI model responsibly so that our users will feel safe using our AI therapist application.

## ✅ Accomplishments that we're proud of ✅

We were able to create an AI therapist by creating a self-teaching AI using the Cohere API to train an AI model that integrates seamlessly into our application. It delivers more personalized responses to the user by allowing it to adapt its current responses to users based on the user's conversation history and
making conversations accessible only to that user. We were able to effectively delegate team roles and seamlessly integrate the Cohere model into our application. It was lots of fun combining our existing web development experience with venturing out to a new domain like machine learning to approach a mental health issue using the latest advances in AI technology.

## 🙋‍♂️ What we learned 🙋‍♂️

We learned how to be more resourceful when we encountered debugging issues, while balancing the need to make progress on our hackathon project. By exploring every possible solution and documenting our findings clearly and exhaustively, we either increased the chances of solving the issue ourselves, or obtained more targeted help from one of the UofT Hacks X mentors via Discord. Our goal is to learn how to become more independent problem solvers. Initially, our team had trouble deciding on an appropriately scoped, sufficiently original project idea. We learned that our project should be both challenging enough but also buildable within 36 hours, but we did not force ourselves to make our project fit into a particular prize category -- and instead letting our project idea guide which prize category to aim for. Delegating our tasks based on teammates' strengths and choosing teammates with complementary skills was essential for working efficiently.

## 💭 What's next? 💭

To improve our project, we could allow users to customize their AI therapist, such as its accent and pitch or the chat website's color theme to make the AI therapist feel more like a personalized consultant to users. Adding a login page, registration page, password reset page, and enabling user authentication would also enhance the chatbot's security. Next, we could improve our website's user interface and user experience by switching to Material UI to make our website look more modern and professional.