loading tf only in interrogation process

This commit is contained in:
Greendayle 2022-10-07 20:37:43 +02:00
parent 537da7a304
commit 54fa613c83
1 changed files with 4 additions and 3 deletions

View File

@ -1,12 +1,13 @@
import os.path import os.path
from concurrent.futures import ProcessPoolExecutor from concurrent.futures import ProcessPoolExecutor
import numpy as np
import deepdanbooru as dd
import tensorflow as tf
def _load_tf_and_return_tags(pil_image, threshold): def _load_tf_and_return_tags(pil_image, threshold):
import deepdanbooru as dd
import tensorflow as tf
import numpy as np
this_folder = os.path.dirname(__file__) this_folder = os.path.dirname(__file__)
model_path = os.path.join(this_folder, '..', 'models', 'deepbooru', 'deepdanbooru-v3-20211112-sgd-e28') model_path = os.path.join(this_folder, '..', 'models', 'deepbooru', 'deepdanbooru-v3-20211112-sgd-e28')