Skip to content

Commit

Permalink
purejs fix config checkbox initial values
Browse files Browse the repository at this point in the history
  • Loading branch information
bonswouar authored and marcelklehr committed Sep 1, 2021
1 parent 359397d commit 74d137a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Service/ClassifyImagenetService.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ public function classify(array $files): void {

$this->logger->debug('Running '.var_export($command, true));
$proc = new Process($command, __DIR__);
if ($this->config->getAppValue('recognize', 'tensorflow.gpu', 'false') !== 'false') {
if ($this->config->getAppValue('recognize', 'tensorflow.gpu', 'false') === 'true') {
$proc->setEnv(['RECOGNIZE_GPU' => 'true']);
}
if ($this->config->getAppValue('recognize', 'tensorflow.purejs', 'false') !== 'false') {
if ($this->config->getAppValue('recognize', 'tensorflow.purejs', 'false') === 'true') {
$proc->setEnv(['RECOGNIZE_PUREJS' => 'true']);
$proc->setTimeout(count($paths) * self::IMAGE_PUREJS_TIMEOUT);
}else{
Expand Down

0 comments on commit 74d137a

Please sign in to comment.