Skip to content

Commit

Permalink
lgtm
Browse files Browse the repository at this point in the history
  • Loading branch information
dcmartin committed Aug 27, 2020
1 parent dd7937f commit 8cde587
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion ambianic/config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "Ambianic Edge",
"stage": "stable",
"version": "1.7.0",
"version": "1.7.1",
"slug": "ambianic",
"description": "Ambianic Edge AI",
"url": "https://github.com/dcmartin/addon-ambianic",
Expand Down
15 changes: 9 additions & 6 deletions ambianic/rootfs/usr/bin/ambianic.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,28 +89,31 @@ ambianic::update.ai_models.video()
local edgetpu="${AMBIANIC_EDGE}/ai_models/${tflite}_edgetpu.tflite"

tflite="${AMBIANIC_EDGE}/ai_models/${tflite}.tflite"

if [ -s "${tflite}" ] && [ -s "${edgetpu}" ]; then
if [ -s "${tflite}" ]; then
echo " ${name}:"
echo ' model:'
echo " tflite: ${tflite}"
echo " edgetpu: ${edgetpu}"

if [ -s "${edgetpu}" ]; then
echo " edgetpu: ${edgetpu}"
else
bashio::log.warning "${FUNCNAME[0]}: model specified, but edgetpu no found; edgetpu: ${edgetpu:-}"
fi

if [ "${labels:-null}" != 'null' ]; then
labels="${AMBIANIC_EDGE}/ai_models/${labels}_labels.txt"

if [ ! -s "${labels}" ]; then
bashio::log.warning "${FUNCNAME[0]}: labels specified; NOT FOUND; path: ${labels}"
else
bashio::log.debug "${FUNCNAME[0]}: labels specified; path: ${labels}"
fi
echo " labels: ${labels}"
else
bashio::log.debug "${FUNCNAME[0]}: no labels specified"
bashio::log.warning "${FUNCNAME[0]}: no labels specified"
fi
echo ' top_k: '${top_k:-1}
else
bashio::log.error "${FUNCNAME[0]}: model specified, but not found; tflite: ${tflite:-}; edgetpu: ${edgetpu:-}"
bashio::log.error "${FUNCNAME[0]}: model specified, but not found; tflite: ${tflite:-}"
fi
}

Expand Down

0 comments on commit 8cde587

Please sign in to comment.