This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from Processes import Process, ProcessesLogic | |
import pickle | |
class LivePredictionProcess(Process): | |
def __init__(self, scriptPath, volume, model_path, active=True): | |
Process.__init__(self, scriptPath) | |
self.volume = volume # Numpy array, to use as input for the model. | |
self.model_path = model_path # Path to the TF model you'd like to load, as TF Models are not picklable. | |
self.active = bytes([1]) if active else bytes([0]) # Used to stop the process by enabling/disabling the script. |