Skip to content

Commit 3f668ad

Browse files
authored
Merge pull request #69 from aahill/ir-sdk
Code tag, env variable updates
2 parents 9b96290 + 6433fcc commit 3f668ad

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

samples/vision/inkrecognizer_sample.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
# You can also use an Azure credential instance
2020
# <InkRecognizerClientConfig>
2121
INK_RECOGNIZER_URL = "https://api.cognitive.microsoft.com/inkrecognizer"
22-
KEY = os.environ['INK_RECOGNIZER_SUBSCRIPTION_KEY'].strip()
22+
KEY = os.environ['INK_RECOGNITION_SUBSCRIPTION_KEY'].strip()
2323

2424
# The default locale is "en-US". Setting a different language for a stroke will overload this value.
2525
LANGUAGE_RECOGNITION_LOCALE = "en-US"
@@ -60,7 +60,8 @@ def __init__(self, url, key):
6060
key,
6161
application_kind=APPLICATION_KIND, # default arguments for each request.
6262
)
63-
63+
# </inkClient>
64+
# <inkClientRequest>
6465
def send_request(self, ink_stroke_list):
6566
self._root = None
6667
try:
@@ -80,9 +81,9 @@ def send_request(self, ink_stroke_list):
8081
self._root = root
8182
except Exception as e:
8283
messagebox.showinfo("Error", e)
83-
# </inkClient>
84+
# <inkClientRequest>
8485

85-
# <KeyScenarioExample>
86+
# <recognitionManager>
8687
class RecognitionManager:
8788
def __init__(self, pixel_per_mm):
8889
self._pixel_per_mm = pixel_per_mm
@@ -122,7 +123,7 @@ def search(self, word):
122123
num_words = 0
123124
search_result = "Find %s word%s" % (num_words, "s" if num_words != 1 else "")
124125
messagebox.showinfo("Search Result", search_result)
125-
# </KeyScenarioExample>
126+
# </recognitionManager>
126127

127128

128129
# <SampleUI>

0 commit comments

Comments
 (0)