Azure Cognitive Services Quickstart completed steps divided into branches.
Azure Cognitive Services - Custom Vision Quickstart completed steps divided into branches.
-
Create a
.env
file and add your variables that are defined in '.env.example' file, then run the following commands: -
Install dependencies
npm install
- Start the sample file
node sample.js
Or by running
npm st
- Create a new folder for your project, ex: CognitiveServices.
- Initialize a git project.
git init
- Initialize an npm project.
npm init
- Install the Custom Vision SDK
npm install @azure/cognitiveservices-customvision-training
npm install @azure/cognitiveservices-customvision-prediction
-
Get the Training and prediction Keys
-
Add the Keys as environment variable on your console.
export trainingKey={your training key}
export predictionKey={your predictionKey key}
export predictionResourceId={your predictionResourceId key}
-
Create and add sample.js file
-
Change the Key variables in your code to use your environment variables.
const trainingKey = process.env.trainingKey;
const predictionKey = process.env.predictionKey;
const predictionResourceId = process.env.predictionResourceId;