aboutsummaryrefslogtreecommitdiff
path: root/src/client/cognitive_services
diff options
context:
space:
mode:
authorStanley Yip <stanley_yip@brown.edu>2020-05-18 14:24:28 -0700
committerStanley Yip <stanley_yip@brown.edu>2020-05-18 14:24:28 -0700
commit21cd63dc9536deea17814231605ff22ea59e26b4 (patch)
treec201ca8b061b373617c4f3f6cc35386720e97c6d /src/client/cognitive_services
parentf23fde615bbeb98a93923eab1ee11c2230e67cd5 (diff)
fixed some bugs with webbox and hacked some problems with cognitive services
Diffstat (limited to 'src/client/cognitive_services')
-rw-r--r--src/client/cognitive_services/CognitiveServices.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/cognitive_services/CognitiveServices.ts b/src/client/cognitive_services/CognitiveServices.ts
index 8c63ae906..570d135c4 100644
--- a/src/client/cognitive_services/CognitiveServices.ts
+++ b/src/client/cognitive_services/CognitiveServices.ts
@@ -45,7 +45,11 @@ export enum Confidence {
export namespace CognitiveServices {
const ExecuteQuery = async <D>(service: Service, manager: APIManager<D>, data: D): Promise<any> => {
- const apiKey = process.env[service.toUpperCase()];
+ let apiKey = process.env[service.toUpperCase()];
+ // A HACK FOR A DEMO VIDEO - syip2
+ if (service === "handwriting") {
+ apiKey = "61088486d76c4b12ba578775a5f55422";
+ }
if (!apiKey) {
console.log(`No API key found for ${service}: ensure index.ts has access to a .env file in your root directory.`);
return undefined;