A simple Python program interpreting the PixaBay API and the Microsoft Azure Computer Vision
the Azure code is from here
- make sure you have git installed download git
- make sure you have Python installed download it (this requires Python 3.0 or higher)
- Go to the Microsoft Azure portal
- In the search bar search for computer vision
- Click on "Computer vision" from the Marketplace section
- Fill in the details and select the free pricing tier (you also can select the S1 tier, but for our purposes, the free one will be enough).
-
From the Azure Portal sidebar, go to "All resources"
-
Then go to the resource you just created and select "Quick start"
To get your Pixabay API key, go to the API documentation page [requires sign-in first] and copy the code from the page
- install the dependencies
pip install -r requirements.txt
- In the Terminal or CMD, clone the repo with
git clone https://github.com/filiptronicek/related-pics.git
- Set the environment variables
COMPUTER_VISION_SUBSCRIPTION_KEY
,COMPUTER_VISION_ENDPOINT
andPIXABAY_API_KEY
withsetx COMPUTER_VISION_SUBSCRIPTION_KEY "your-key"
- Start the script with
python main.py