Giter VIP home page Giter VIP logo

food-bot's Introduction

food-b🍩t

About

food-bot is a NLP Discord chatbot that suggests recipes to cook based on your preferences through using conversational AI. I created food-bot to help me discover new recipes and to provide an easy and fun interface to chat with. Through using discordpy, a modern python API wrapper for Discord, I was able to read and send messages to the channel. I used the spoonacular API to request recipe data using different endpoints such as Search Recipes by Ingredients and Get Similar Recipes. The chatbot is implemented using pytorch and popular NLP python libraries.

Features

  • Offers basic greetings
  • Tells funny food-related jokes
  • Finds appropriate recipes based on user preferences, taking dietary restrictions and intolerances into account
    • Sends similar recipes upon request (reaction-based input handling)

Use Cases

What can I make with the ingredients in my fridge? I don't know what to cook, send me a random recipe.
Suggest a few dessert recipes for me based on my dietary preferences. Tell me a joke.

The Model

I chose a feed forward neural network with 2 hidden layers, which was able to learn well given the training data. This was the best choice for detection of patterns in text to predict user input and then select choose the best response by food-bot. The code for the implementation of the feed-forward 2-layer neural net is borrowed from here.

Why the spoonacular API?

The API has access to thousands of recipes, and provides an efficient way to search for recipes matching my preferences. I used multiple endpoints to retrieve different pieces of recipe information, and stitched the info together for each picture by constructing a discord embed, which displayed a picture of the recipe and its relevant info.

Customization

Currently, food-bot is programmed to retrieve random recipes, recipes given ingredients, and recipes given a meal type based on my dietary preferences. In the future, I will be expanding food-bot's capabilities to handle the needs of other humans.

Functionality

What I Learned

  • Gained asynchronous programming knowledge using async/await
  • Improved my understanding of neural nets and how to implement one in python
  • How to apply NLP techniques such as stemming, lemmatization
  • How to interact with an API

food-bot's People

Contributors

tatianabarbone avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Forkers

kaderomeiri

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.