1- diff --git a/app/gear.py b/app/gear.py
2- index b602dfe..ab92667 100644
3- --- a/app/gear.py
4- +++ b/app/gear.py
5- @@ -27,6 +27,7 @@ def toOneList(l):
1+ --- gear.py 2021-03-29 17:15:04.726216533 -0500
2+ +++ gear.py.updated 2021-03-29 17:14:34.195958815 -0500
3+ @@ -27,6 +27,7 @@
64 return res
75
86 def addToGraphRunner(x):
97+ x = x['value']
108 try:
119 xlog('addToGraphRunner:', 'count=', x['count'])
1210
13- @@ -54,7 +55,7 @@ def addToGraphRunner(x):
11+ @@ -54,7 +55,7 @@
1412 animal = index[str(res.index(res1[0]) - 1)][1]
1513 xlog('addToGraphRunner:', 'animal=', animal)
1614
@@ -19,7 +17,7 @@ index b602dfe..ab92667 100644
1917 except:
2018 xlog('addToGraphRunner: error:', sys.exc_info()[0])
2119
22- @@ -62,21 +63,24 @@ def addToStream(x):
20+ @@ -62,21 +63,24 @@
2321 # save animal name into a new stream
2422 try:
2523 redisgears.executeCommand('xadd', 'cats', 'MAXLEN', '~', str(MAX_IMAGES), '*', 'image', 'data:image/jpeg;base64,' + base64.b64encode(x[1]).decode('utf8'))
@@ -46,23 +44,10 @@ index b602dfe..ab92667 100644
4644 except:
4745 xlog('passAll: error:', sys.exc_info()[0])
4846
49- @@ -87,4 +91,5 @@ gearsCtx('StreamReader').\
47+ @@ -87,4 +91,5 @@
5048 map(addToGraphRunner).\
5149 filter(lambda x: 'cat' in x[0]).\
5250 foreach(addToStream).\
5351- register('camera:0')
5452+ register(prefix='camera:0')
5553+
56- diff --git a/app/init.py b/app/init.py
57- index 09f77bc..64a1303 100644
58- --- a/app/init.py
59- +++ b/app/init.py
60- @@ -27,7 +27,7 @@ if __name__ == '__main__':
61- print('Loading model - ', end='')
62- with open('models/mobilenet_v2_1.4_224_frozen.pb', 'rb') as f:
63- model = f.read()
64- - res = conn.execute_command('AI.MODELSET', 'mobilenet:model', 'TF', 'CPU', 'INPUTS', 'input', 'OUTPUTS', 'MobilenetV2/Predictions/Reshape_1', model)
65- + res = conn.execute_command('AI.MODELSET', 'mobilenet:model', 'TF', 'CPU', 'INPUTS', 'input', 'OUTPUTS', 'MobilenetV2/Predictions/Reshape_1', 'BLOB', model)
66- print(res)
67-
68- # Load the gear
0 commit comments