WantON is a Flask server that responds to image text-messages with the addresses of three different restaurants nearby that likely have the food that is depicted in the image. Powered by Twilio, Clarifai, and Yelp!
#####*WantON was implemented and tested in Python 3.5 in a Unix terminal. Using a different version of Python or a non Unix Terminal may not work.*
Clone this repository with the following command in terminal.
git clone https://github.com/bhernandez-cs/WantON.git
Within terminal and inside the project folder, install the necessary libraries and APIs that are required by WantON. A virtual environment is a good idea!
pip install -r requirements.txt
Create a new file titled 'credentials.py' that will host your personal credentials for the Twilio API and the Clarifai API. Inside of your 'credentials.py' file should be the following:
#You can find/get Twilio credntials at https://www.twilio.com/console
account_sid = "YOUR TWILIO ACCOUNT SID"
auth_token = "YOUR TWILIO AUTH TOKEN"
my_twilio_number = "YOUR TWILIO PHONE NUMBER"
#You can find/get Clarifai credentials at https://developer.clarifai.com/account/applications/
my_clarifai_id = "YOUR CLARIFAI ID"
my_clarifai_secret = "YOUR CLARAFAI SECRET"
#You can find/get Yelp credentials at https://www.yelp.com/developers/v2/manage_api_keys
my_yelp_consumer_key = "YOUR YELP CONSUMER KEY"
my_yelp_consumer_secret = "YOUR YELP CONSUMER SECRET"
my_yelp_token = "YOUR YELP TOKEN"
my_yelp_token_secret = "YOUR YELP TOKEN SECRET"
Start the Flask WantON server with the following command inside of the project folder in terminal.
python WantON.py
In order to let Twilio find your server, you can use any of the following services.
Once you have an online server endpoint, visit the settings for your Twilio phone number at https://www.twilio.com/console and enter your endpoint:
Save these settings and turn your want ON!
- Location for restaurant search is based off of the general area that a given phone number belongs to. Hard to get location data from a single text message.
- Only the first five Clarifai tags for a given image are used, which narrows the Yelp search well. However it may be less accurate.