Last active
June 2, 2019 19:15
-
-
Save selynna/6ffa284e353a47615e32e81ad24caea8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# index.js | |
// Create project | |
const util = require('util'); | |
const fs = require('fs'); | |
const TrainingApiClient = require("azure-cognitiveservices-customvision-training"); | |
const PredictionApiClient = require("azure-cognitiveservices-customvision-prediction"); | |
const setTimeoutPromise = util.promisify(setTimeout); | |
// Set up environment variables | |
const dotenv = require('dotenv'); | |
dotenv.config(); | |
const trainingKey = process.env.TRAINING_KEY; | |
const predictionKey = process.env.PREDICTION_KEY; | |
const predictionResourceId = process.env.PREDICTION_RESOURCE_ID; | |
const dataRoot = './photos'; | |
const endpoint = "https://westus2.api.cognitive.microsoft.com" | |
const publishIterationName = "classifyModel"; | |
const trainer = new TrainingApiClient(trainingKey, endpoint); | |
(async () => { | |
console.log("Creating project..."); | |
const sampleProject = await trainer.createProject("Azure CV Demo") | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment