Skip to content

Azure Function written in Python that predicts the dog breed based on an Image URL.

Notifications You must be signed in to change notification settings

mehreentahir16/dog-classification

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Prerequisites

To use this sample:

Download the sample

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

Create and activate a virtual environment

To work with an Python Azure Function project, it is required that you work in a Python 3.6 virtual environment. Run the following commands to create and activate a virtual environment named .env.

# In Bash
python3.6 -m venv .env
source .env/bin/activate

# In PowerShell
py -3.6 -m venv .env
.env\scripts\activate

Install dependencies

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

Test

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>

Publish to Azure

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> --build-native-deps

About

Azure Function written in Python that predicts the dog breed based on an Image URL.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%