To use this sample:
- Install Python 3.6
- Install the Azure CLI version 2.x or later.
- Install Azure Functions Core Tools version 2.7.1437 or later
In a terminal window, run the following commands to clone the sample application to your local machine, and navigate to the directory with the sample code.
git clone https://github.com/asavaritayal/dog-classification.git
cd dog-classification
The names and versions of the required packages are already listed in the requirements.txt
file. Use the following command to install these dependencies using pip
:
pip install -r requirements.txt
Use the following command to run the Functions host locally.
func host start
Trigger the function from the command line using curl in a new terminal window:
curl -w '\n' http://localhost:7071/api/classify?img=<image_url>
Using the Azure Functions Core Tools, run the following command. Replace <APP_NAME> with the name of your Linux Function App.
func azure functionapp publish <APP_NAME>