## Inspiration

It was our first time attending a hackathon, and we were filled with equal parts excitement and trepidation as we made our way to Stanford's TreeHacks. Having come from Berkeley, USC, and right here at Stanford without teams, we all met in Huang basement. We soon settled into the opening ceremonies and listened to the speakers like Sajith from Benchling and sponsors whose products made our jaws drop: we knew that TreeHacks was the right place for us.

Over the next few hours, we spent time brainstorming ideas and trying to come up with something that would be both impactful and feasible given our varied backgrounds. We had CS students, designers, and businesspeople on our team, but we were all new to the world of hackathons and unsure of where to begin.

We spent hours ideating, jotting down countless ideas on a napkin (yes, we really did). But no matter what we came up with, we always seemed to hit a wall when it came to actually building the product. We attended lectures and workshops, trying to pick up as much technical knowledge as we could, and reached out to mentors for guidance.

Our final idea was inspired by Otsuka Valuenex which made us realize how undervalued food is as a medium of social connection. We wanted to create a webapp that would streamline this process for a better experience. We chose to tackle both challenges of food finding and receipt splitting into a single concise application.

## What it does

The goal of MealMingle is to streamline the entire eating experience. We believe the ability for restaurants to connect people through the joy of sharing good food is highly underestimated, which is why we’ve developed a software which does all the hard work for the foodies out there who don’t want to waste time scrolling pages of Yelp for restaurants or doing frustrating bill calculations.

Using receipt scanning OCR, MealMingle allows friends and family to easily split the bill based on what items they ordered. All you have to do is open the MealMingle website then scan the receipt, and a QR code gets generated for everyone to join and select which items they bought. Once confirmed, payment requests get sent out to everyone through Checkbook! This consolidated process ensured that each person paid only for the items they ordered, while minimizing the potential for errors and disagreements.

Using the GPT-3 model, MealMingle also solves the issue of finding a great place to eat. You simply input various parameters into our food finder and are returned with a list of personalized restaurants, tuned to your preferences.

Enjoy your night out with friends to the fullest – leave the tedious tasks to us.

## How we built it

We first used Figma to prototype our thoughts into designs. We then used Retool to create an interface that finds restaurant options based on user inputted parameters that were fed into GPT-3. We built our website using a mixture of HTML, CSS, and JavaScript for style and functionality. Finally, we added payment functionality using Checkbook.

## Challenges we ran into

Over the course of 36 hours, our team struggled through many unexpected challenges as we used various different APIs for the first time. While each challenge was frustrating in its own right, through many sleepless collaborative hours, we managed to conquer each one and not only grow stronger as developers, but also as teammates.

In building the Food Finder AI bot and reversing the cost-to-person dictionary, difficulty took the form of navigating the Retool platform and utilizing prompt engineering with Open AI’s API to create the desired outputs from GPT-3. At first, the Retool software was undoubtedly foreign for us: image generation was laggy, handling queries involved a steep learning curve, and prompts would consistently fail due to timeout errors from the Open AI API. However, with help from the engineers at Retool, we worked at understanding the software tirelessly until we optimized our features to our liking and were able to navigate the system like experts.

One of the most frustrating roadblocks we ran into in this segment of the project was GPT-3’s inability to distribute tax and tip among the restaurant party and properly calculate invoice amounts. Reversing the dictionary was a difficult task involving many steps, and we struggled with articulating to GPT-3 exactly what we wanted as the output. After tedious debugging and experimenting with different prompts, however, we finally engineered a prompt which caused GPT-3 to consistently understand our intentions; after overcoming that, the rest was history.

Website development proved to be much harder than expected. Formatting the HTML elements was a painstaking effort because we wanted everything to be perfect. Figuring out how to incorporate APIs into the website also proved to be difficult, especially given that many of us were not familiar with APIs prior. We tried to use Tesseract to scan receipts, but our programs were unable to successfully pull the data. In the end, we used the requests library and OCR which accomplished the same task.

## Accomplishments we’re proud of

Looking back on these past 36 hours and browsing through the software we’ve developed, we are extremely proud of ourselves for what we have for all being novice hackers. While forming our team, we definitely had doubts regarding how we were going to perform: none of us have extensive programming experience, nor did any of us have a strong idea of what we wanted to create heading into the hackathon. However, looking at how smoothly our software runs and how successfully we incorporated GPT-3 to do the heavy-lifting in our program, we’re all more than satisfied with how far we’ve come since Friday night.

Three feats we’re especially proud of include our utilization of various APIs into our program, our extensive front-end web development, and our leveraging of AI techniques such as computer vision and natural language processing. Despite our lack of hackathon experience, all of us embraced the unknown and created a project utilizing APIs from Checkbook, Retool, and Open AI. The benefits these APIs provided allowed us to create an impressive project we could’ve never constructed from scratch. We also dived headfirst into front-end development despite our team’s extremely limited prior experience with HTML and CSS, though granted we had GitHub Copilot to aid us in our endeavors. Lastly, we’re proud we had the ambition to tackle high-level topics like computer vision and NLP and weren’t discouraged from building projects which excited us. The encouraging learning environment of TreeHacks helped us accomplish feats we never would’ve dreamed of finishing in our wildest dreams, and all of us are beyond excited to continue gaining hackathon experience and pushing ourselves beyond our utmost limits.

## What we learned

In the end, we were proud of what we had accomplished, and even more proud of the teamwork and collaboration that had gone into creating it. We learned frontend, backend, API calls and how to use products such as Retool and Checkbook. We may have been new to the world of hackathons, but we had proven that with hard work and determination, anything was possible. We hope to attend more hackathons in the future and to be here for Treehacks again next year!

## What's next for MealMingle

A lot! Most importantly, we want to make our Food Finder functionality available on other devices so that others can get personalized restaurant recommendations. We’re also heavily interested in utilizing more APIs and AI technologies to further improve different facets of the culinary experience. A significant goal of ours that we were unable to implement due to the time constraints was to have the Food Finder chatbot be more conversational and leverage user data and machine learning to make personalized restaurant recommendations. With more time and resources, we look forward to transforming features like these from ideas into realities and fleshing out MealMingle to be an efficient and convenient software for everyone!
## Inspiration

Looking around you in your day-to-day life you see so many people eating so much food. Trust me, this is going somewhere. All that stuff we put in our bodies, what is it? What are all those ingredients that seem more like chemicals that belong in nuclear missiles over your 3 year old cousins Coke? Answering those questions is what we set out to accomplish with this project. But answering a question doesn't mean anything if you don't answer it well, meaning your answer raises as many or more questions than it answers. We wanted everyone, from pre-teens to senior citizens to be able to understand it. So in summary of what we wanted to do, we wanted to give all these lazy couch potatoes (us included) an easy, efficient, and most importantly, comprehendible method of knowing what it is exactly that we're consuming by the metric ton on a daily basis.

## What it does

What our code does is that it takes input either in the form of text or image, and we use it as input for an API from which we extract our final output using specific prompts. Some of our outputs are the nutritional values, a nutritional summary, the amount of exercise required to burn off the calories gained from the meal, (its recipe), and its health in comparison to other foods.

## How we built it

Using Flask, HTML,CSS, and Python for backend.

## Challenges we ran into

We are all first-timers so none of us had any idea as to how the whole thing worked, so individually we all faced our fair share of struggles with our food, our sleep schedules, and our timidness, which led to miscommunication.

## Accomplishments that we're proud of

Making it through the week and keeping our love of tech intact. Other than that we really did meet some amazing people and got to know so many cool folks. As a collective group, we really are proud of our teamwork and ability to compromise, work with each other, and build on each others ideas. For example we all started off with different ideas and different goals for the hackathon but we ended up all managing to find a project we all liked and found it in ourselves to bring it to life.

## What we learned

How hackathons work and what they are. We also learned so much more about building projects within a small team and what it is like and what should be done when our scope of what to build was so wide.

## What's next for NutriScan

-Working ML
-Use of camera as an input to the program
-Better UI
-Responsive
-Release
## Problem Statement

As the number of the elderly population is constantly growing, there is an increasing demand for home care. In fact, the market for safety and security solutions in the healthcare sector is estimated to reach $40.1 billion by 2025.
The elderly, disabled, and vulnerable people face a constant risk of falls and other accidents, especially in environments like hospitals, nursing homes, and home care environments, where they require constant supervision. However, traditional monitoring methods, such as human caregivers or surveillance cameras, are often not enough to provide prompt and effective responses in emergency situations. This potentially has serious consequences, including injury, prolonged recovery, and increased healthcare costs.

## Solution

The proposed app aims to address this problem by providing real-time monitoring and alert system, using a camera and cloud-based machine learning algorithms to detect any signs of injury or danger, and immediately notify designated emergency contacts, such as healthcare professionals, with information about the user's condition and collected personal data.
We believe that the app has the potential to revolutionize the way vulnerable individuals are monitored and protected, by providing a safer and more secure environment in designated institutions.

## Developing Process

Prior to development, our designer used Figma to create a prototype which was used as a reference point when the developers were building the platform in HTML, CSS, and ReactJs.
For the cloud-based machine learning algorithms, we used Computer Vision, Open CV, Numpy, and Flask to train the model on a dataset of various poses and movements and to detect any signs of injury or danger in real time.
Because of limited resources, we decided to use our phones as an analogue to cameras to do the live streams for the real-time monitoring.

## Impact

* **Improved safety:** The real-time monitoring and alert system provided by the app helps to reduce the risk of falls and other accidents, keeping vulnerable individuals safer and reducing the likelihood of serious injury.
* **Faster response time:** The app triggers an alert and sends notifications to designated emergency contacts in case of any danger or injury, which allows for a faster response time and more effective response.
* **Increased efficiency:** Using cloud-based machine learning algorithms and computer vision techniques allow the app to analyze the user's movements and detect any signs of danger without constant human supervision.
* **Better patient care:** In a hospital setting, the app could be used to monitor patients and alert nurses if they are in danger of falling or if their vital signs indicate that they need medical attention. This could lead to improved patient care, reduced medical costs, and faster recovery times.
* **Peace of mind for families and caregivers:** The app provides families and caregivers with peace of mind, knowing that their loved ones are being monitored and protected and that they will be immediately notified in case of any danger or emergency.

## Challenges

One of the biggest challenges have been integrating all the different technologies, such as live streaming and machine learning algorithms, and making sure they worked together seamlessly.

## Successes

The project was a collaborative effort between a designer and developers, which highlights the importance of cross-functional teams in delivering complex technical solutions. Overall, the project was a success and resulted in a cutting-edge solution that can help protect vulnerable individuals.

## Things Learnt

* **Importance of cross-functional teams:** As there were different specialists working on the project, it helped us understand the value of cross-functional teams in addressing complex challenges and delivering successful results.
* **Integrating different technologies:** Our team learned the challenges and importance of integrating different technologies to deliver a seamless and effective solution.
* **Machine learning for health applications:** After doing the research and completing the project, our team learned about the potential and challenges of using machine learning in the healthcare industry, and the steps required to build and deploy a successful machine learning model.

## Future Plans for SafeSpot

* First of all, the usage of the app could be extended to other settings, such as elderly care facilities, schools, kindergartens, or emergency rooms to provide a safer and more secure environment for vulnerable individuals.
* Apart from the web, the platform could also be implemented as a mobile app. In this case scenario, the alert would pop up privately on the user’s phone and notify only people who are given access to it.
* The app could also be integrated with wearable devices, such as fitness trackers, which could provide additional data and context to help determine if the user is in danger or has been injured.