a web app that displays a quote related to a submitted image
demo.py
uses Clarifai's image recognition API to analyze an image and generate a list of tags based on the image contentscraper.py
retrieves quotes from Goodreads.com based on the image tags.
to get this code up and running on your own machine,
- make sure you have Python and the pip package installer
- clone this repository (or download it to your desktop)
- in terminal, navigate to the project directory
$ cd /path/to/quotifai
- install the required Python packages
$ pip install -r requirements.txt
- get a Clarifai API key from developer.clarifai.com and follow these instructions (under
Setup
) to configure it on your machine - tell Flask which application to work with by setting the FLASK_APP environment variable:
- on MacOS/Linux:
$ export FLASK_APP=app.py
- on Windows:
$ set FLASK_APP=app.py
- on MacOS/Linux:
- now you can run the app using
flask run
, and navigate to http://127.0.0.1:5000/ to see it live! your terminal should look like this:$ flask run * Serving Flask app "app" * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
- Clarifai API Python Client
- The Flask Mega-Tutorial, Part III: Web Forms by Miguel Grinberg
- Flask Quickstart
feedback and pull requests are warmly welcomed and encouraged!
tweet me @elanatee if you have any questions!