Inspiration

Food waste is a major issue. However, when analyzing how to reduce it, many discussions focus primarily on the consumer. U.S. restaurants throw away 84.3 percent of unused food. Moreover, they account for 17 percent of all food directly discarded into the trash. Imagine if there were software that could help reduce food waste and encourage food donations. Welcome to ServeSmart!

What it does

ServeSmart combines machine learning, interactive tools, and social good features to help restaurants reduce waste.

  • Prediction Model: Using a custom scikit-learn XGBoost regression model, ServeSmart provides actionable insights on how much food a restaurant should order. Owners input parameters such as city size, type of cuisine, and more, and the model predicts the optimal amount of ingredients to purchase.

  • Chatbot Assistant: Our chatbot allows restaurant owners to interact directly with their data. They can manage inventory, ask questions, add new data entries, and streamline operations—all while minimizing waste.

  • Donations Tab: To ensure sustainability, any predicted surplus can be redirected to local food banks, helping fight hunger and reducing environmental impact.

How we built it

Although we initially started with a food demand predictor, we used a public Kaggle dataset on food demand forecasting. Since the dataset only contained a city_id, we merged it with another dataset on fulfillment centers to enrich the context.

We then performed data preprocessing and feature engineering: cleaning missing values, normalizing values, and generating new features such as discount percentage, which better captured consumer behavior. We also visualized correlations between variables to identify the most important predictors and refine our feature set.

The model inputs included features such as:

  • emailer for promotion
  • homepage featured flag
  • week
  • checkout price
  • discount percent
  • fulfillment center details
  • historical demand

For training, we used an XGBoost Regressor. To improve performance, we tuned hyperparameters using GridSearchCV, which allowed us to systematically test parameter combinations and select the best-performing model. After tuning, the model achieved ~76% accuracy in predicting orders.

Finally, we saved the trained model as a .pkl file and integrated it with our Flask backend. The Flask API communicates with the React frontend via JSON requests, making real-time predictions possible. The system is currently hosted on a local server for testing.

Challenges we ran into

Naturally, prediction software at this scale relies on a large amount of data. We quickly realized that there was no exact dataset that matched our needs for this project. To tackle this issue, we merged two existing datasets and created powerful prediction software that helps reduce waste for restaurants.

What we learned

We learned how to collaborate effectively as a team to brainstorm, refine, and execute an idea. Although we initially struggled to come up with a concept, we discovered how to work together to develop something meaningful and impactful.

What's next for ServeSmart

Expand our dataset, improve our models, and make a more interactive dashboard so that we can reduce food wastage!

Built With

Share this project:

Updates