-
-
The results graph showing users many different statistics about the attraction predicted and analyzed by the model in the provided chat
-
Users can easily upload their chat files on the main page of our website
-
A guide on how to export the Telegram chat so that it would work with how we organize our ML model
-
About us telling users about the purpose and inspiration for our solution
-
Technologies we used for the project and a software architecture diagram
-
Landing page that we tried to make as aesthetic as possible
Inspiration
Here at ÀI, we understand the struggles that many singles face. Some call it the dating game, others the talking phase, or even a situationship. Whatever the phrase used, the experience is an arduous and confusing one for many singles looking to find a partner. After some research and soul searching, we realized that the underlying problem is that:
It is difficult to figure out if your interest is reciprocated.
From deciphering if they are flirty or just friendly to calculating their response times, it is often a guessing game in trying to figure out if they like you back. This asymmetric information may sometimes lead to making the wrong decision such as confessing too early or not at all.
What it does
Here at ÀI, we believe that we have found the solution to all your love life problems. Using state of the art technology of sentiment analysis with machine learning, our solution can convert your chat history into visualizable data that tells you how much they actually like you.
Our Natural Language Processing (NLP) ML model was adapted from a pre-trained Pytorch model used to gauge customer sentiment in product reviews. Using this model, we extract positive and negative keywords from the chats and utilized it as one of the measurements to predict the interest of the other party. The score ranges from 1 to 5, where 1 indicates a conversation with negative energy, while 5 indicates a conversation with sparks flying ✨.
How we built it
The Pytorch ML model is hosted on the cloud with AWS Lambda and AWS Elastic File System (EFS). When users upload their chat history, they receive their predictions using FastAPI which provides a Rest API to link the frontend to the model.
(Unfortunately, due to the size of the model, we were unable to host the Pytorch model onto the cloud. The code is still in the GitHub repository, though the frontend is currently rendering randomly generated data into the charts and dashboard)
However, we quickly became aware that sentiment analysis alone is insufficient due to the multifaceted nature of attraction. Therefore, we did even more data analysis through using Matplotlib to parse the chats and calculating the average response time for each person for each day. With this additional data, we were able to do a weighted average between all our data points to come up with an indication of interest 😍.
We utilized Next.js, TypeScript and Tailwind CSS for the frontend. Next.js has static-site generation capabilities coupled with client-side rendering to ensure that the static portions of the website are easily indexed by web crawlers and load quickly while the analyzer renders with low response times. TypeScript helps us in our development to prevent bugs as the project scales while increasing efficiency with intellisense 💻.
Challenges we ran into
AI/ML is definitely one of the more difficult tech areas to pick up. Having had no prior experience in the subject beforehand, it was definitely a challenge for us to learn and implement a ML model simultaneously.
Furthermore, despite having a working ML model and integrated Python FastAPI Back-end, we were unable to deploy the ML model on a back-end server due to the large size of the machine learning model. However, we have added a link to our GitHub repo for users to try it out themselves!
Accomplishments that we're proud of
We have come quite far since the start of the DLW Hackathon. Successfully deploying a sentiment analysis model using PyTorch is definitely one of our defining achievements over the course of this hackathon.
Furthermore, our user-friendly product front-end is also something that we worked on painstakingly. If we were to bring this idea further, we are confident that our aesthetic front-end and seamless user experience would be able to attract customers into exploring what our webpage has to offer.
What we learned
Being our first foray into the world of Machine Learning and Artificial Intelligence, the MLDA DLW Hackathon 2021 gave us unique insights into the diverse use cases of ML models. Although we did not manage to train our own ML model, learning to use a pre-trained model online was definitely just our first step in our machine learning journey. In the future, we hope to be able to grow our knowledge and learn how to properly deploy our own ML models.
What's next for ÀI: Demystify attraction with Artificial Intelligence
Finally, due to the size of the model, we were unable to deploy it to the cloud and could only test it locally. Uploading the model to the cloud and connecting it to the FastAPI’s REST API would be the first on our to-do list after the hackathon.
We also believe that our idea has immense potential for future extensions. Currently, our idea is only limited to analyzing the sentiment of exported Telegram Chats. In the future, we would like to expand on this idea so that our model would take into account more factors such as double texting, evaluation based on pre-existing behaviour, and more.
Furthermore, our current solution only supports Telegram and requires users to export their chat into a JSON file and uploading it. We would like to create an API that could be used to collaborate with multiple messenger apps and even dating apps (possibly as a paid premium feature). This would allow the app to be more efficient, practical, versatile, and also make it viable with commercialization.
Extensions include:
- Live chat analysis to allow users to grab the attention of interested chat partners.
- Possible chat review functionality for users to review what topics are most interested to potential partners
- Extension outside the realm of dating apps, but for possible use in advertisements to understand what keywords are more effective at retaining user attention.
Log in or sign up for Devpost to join the conversation.