https://github.com/tomasbasham/hack4bananas
https://github.com/tomasbasham/hack4bananas
Last synced: 5 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/tomasbasham/hack4bananas
- Owner: tomasbasham
- Created: 2019-12-07T16:01:11.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2022-12-12T15:00:09.000Z (over 3 years ago)
- Last Synced: 2025-02-22T00:28:03.726Z (about 1 year ago)
- Language: Python
- Size: 13.7 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Granma Bot
Facebook messenger chat bot for generating food recipes.
## Installation
* `git clone git@github.com:tomasbasham/hack4bananas.git`
* `cd hack4bananas`
* `./download_data.sh`
* `docker-compose run --rm --service-ports python`
* `curl -X POST -H "Content-Type: application/json" -d '{"url": "some image url"}' localhost:8080/predict`
## Inspiration
Not being satisfied with being unable to reproduce culinary experiences had at
restaurants or from images of food found on popular image hosting websites (Instagram
;-))
## What it does
We've created a Facebook Messenger message bot that generates recipes from the
photos that are submitted by our users.
## How we built it
The messenger application consists of a NodeJS server reading in user inputs via a webhook
and responding with messages returned from a backend application that is communicated with
asynchronously.
For the backend we created a small Flask app that integrates a Facebook curated PyTorch
machine learning model [InverseCooking](https://github.com/facebookresearch/inversecooking). We pre-process and
feed these images to the model which then generates:
- a recipe name
- set of ingredients
- set of instructions
## Challenges we ran into
We struggled greatly with the Python module system which has historically been a pain in
the ass.
## Accomplishments that we're proud of
IT WORKS!!!!
## What we learned
How to integrate PyTorch with Facebook messenger through the API.