Skip to content

filiptronicek/related-pics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RelatedPics

A simple Python program interpreting the PixaBay API and the Microsoft Azure Computer Vision

the Azure code is from here

Before you start

  • make sure you have git installed download git
  • make sure you have Python installed download it (this requires Python 3.0 or higher)

Get your API keys

Azure

Create the service
  1. Go to the Microsoft Azure portal

search bar

  1. In the search bar search for computer vision

search bar

  1. Click on "Computer vision" from the Marketplace section
  2. 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).

search bar

5. Then just hit the Create button and now we're done creating the Cognitive service.
Getting the API key and the endpoint URL
  1. From the Azure Portal sidebar, go to "All resources"

  2. Then go to the resource you just created and select "Quick start"

search bar

Pixabay

To get your Pixabay API key, go to the API documentation page [requires sign-in first] and copy the code from the page get Pixabay API key

Setup

  1. install the dependencies pip install -r requirements.txt
  2. In the Terminal or CMD, clone the repo with git clone https://github.com/filiptronicek/related-pics.git
  3. Set the environment variables COMPUTER_VISION_SUBSCRIPTION_KEY, COMPUTER_VISION_ENDPOINT and PIXABAY_API_KEY with setx COMPUTER_VISION_SUBSCRIPTION_KEY "your-key"
  4. Start the script with python main.py

Releases

No releases published

Packages

No packages published

Languages