summaryrefslogtreecommitdiff
path: root/runtime/contrib/tflite_classify/src/tflite_classify.cc
diff options
context:
space:
mode:
Diffstat (limited to 'runtime/contrib/tflite_classify/src/tflite_classify.cc')
-rw-r--r--runtime/contrib/tflite_classify/src/tflite_classify.cc14
1 files changed, 2 insertions, 12 deletions
diff --git a/runtime/contrib/tflite_classify/src/tflite_classify.cc b/runtime/contrib/tflite_classify/src/tflite_classify.cc
index 40c15f331..51758e2a6 100644
--- a/runtime/contrib/tflite_classify/src/tflite_classify.cc
+++ b/runtime/contrib/tflite_classify/src/tflite_classify.cc
@@ -38,18 +38,8 @@ int main(const int argc, char **argv)
const int FRAME_WIDTH = 640;
const int FRAME_HEIGHT = 480;
- bool use_nnapi = false;
- bool debug_mode = false;
-
- if (std::getenv("USE_NNAPI") != nullptr)
- {
- use_nnapi = true;
- }
-
- if (std::getenv("DEBUG_MODE") != nullptr)
- {
- debug_mode = true;
- }
+ const bool use_nnapi = nnfw::misc::EnvVar("USE_NNAPI").asBool(false);
+ const bool debug_mode = nnfw::misc::EnvVar("DEBUG_MODE").asBool(false);
std::cout << "USE_NNAPI : " << use_nnapi << std::endl;
std::cout << "DEBUG_MODE : " << debug_mode << std::endl;