The project bh.AI is based upon a recent study that made headlines:
"20 percent of single American men confessed they had zero close friends. More than half of all men report feeling unsatisfied with the size of their friend groups."
bh.AI is an emotional companion app designed to address the issue of loneliness and lack of emotional support. It aims to provide users with a platform to express their feelings and emotions freely. Users can log in to the app and engage in conversations with bh.AI about their emotional state.
bh.AI is built using Flutter for the frontend, Flask for the backend, Mistral AI for querying, and Firebase for authentication. Here's how it works:
-
User Authentication:
- Users can sign up or log in using their email and password via Firebase authentication.
-
Chat Functionality:
- Upon logging in, users are presented with a chat screen where they can communicate with bh.AI about how they are feeling.
- Users can send text messages to bh.AI, expressing their emotions and feelings.
-
Emotion Analysis using Deepface:
- When a user sends a message, a photo is captured of their face using the device's camera.
- The photo is then sent as a byte stream to the backend Flask server, where a deep learning model (deepface) performs emotion analysis on the face.
- The emotion analysis results, combined with the user's chat input, are used to formulate a query to Mistral AI, a personalized prompt engineering platform, to generate a comforting response.
-
Storage and Personalization:
- The app stores the user's chat history to provide personalized responses in the future.
- Frontend: Flutter - An open source cross platform UI framework, using which the beautiful screens of bh.AI were built
- Backend: Flask - Backend for the app, uses python , does the image processing as well as queries the LLM using the prompt we engineered
- AI Querying: Mistral AI - An open source and a secure LLM used in the project.
- Authentication: Firebase - Backend as a Service software used to manager user authentication.
- GitHub: Siddhant Jagdish
- Work: Designed the entire app along with wireframing on Figma.
- GitHub: Shubh Kanodia
- Work: Frontend development, integrated login through Firebase, and implemented the chat screen with image capture.
- GitHub: Sowmesh Sharma
- Work: Frontend development, integrated Flask with Flutter, and created endpoints for the chat service.
- GitHub: Shubham Kanekal
- Work: Worked on image analysis using DeepFace, combined chat and image data for querying Mistral, and integrated Flask and Mistral.
![Screenshot 2024-02-19 at 3 18 57 PM](https://private-user-images.githubusercontent.com/110471762/305905005-63aa7f03-e750-40c5-89dd-5571e0431c1f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQyNjIzNjQsIm5iZiI6MTcyNDI2MjA2NCwicGF0aCI6Ii8xMTA0NzE3NjIvMzA1OTA1MDA1LTYzYWE3ZjAzLWU3NTAtNDBjNS04OWRkLTU1NzFlMDQzMWMxZi5wbmc_WC1BbXotQWxnb3JpdGhtPUFXUzQtSE1BQy1TSEEyNTYmWC1BbXotQ3JlZGVudGlhbD1BS0lBVkNPRFlMU0E1M1BRSzRaQSUyRjIwMjQwODIxJTJGdXMtZWFzdC0xJTJGczMlMkZhd3M0X3JlcXVlc3QmWC1BbXotRGF0ZT0yMDI0MDgyMVQxNzQxMDRaJlgtQW16LUV4cGlyZXM9MzAwJlgtQW16LVNpZ25hdHVyZT0zNzNhZGFjNmIxZTVhMTA2NzkzZDljNDM4ZTNkZmEwMDhjMjBlYjRkNjYxMDUwN2Q3MzgyMTMxYTBkZmNkNzM1JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCZhY3Rvcl9pZD0wJmtleV9pZD0wJnJlcG9faWQ9MCJ9.VynabE6RoV8l3b-tMCRBNF0ih0HribpqbDmKphzEuDU)