Fixed some configurations
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Some checks reported errors
continuous-integration/drone/push Build encountered an error
This commit is contained in:
@ -32,7 +32,13 @@ class SoundPreProcessor(AbcPreProcessor):
|
||||
self._temp_means_name = self._temp_model_name + "MEANS"
|
||||
|
||||
logging.debug("Fetching model info...")
|
||||
r = requests.get(f"{config.API_URL}/model/svm/$default/details")
|
||||
|
||||
if config.SVM_MODEL_ID:
|
||||
model_id_to_get = config.SVM_MODEL_ID
|
||||
else:
|
||||
model_id_to_get = '$default'
|
||||
|
||||
r = requests.get(f"{config.API_URL}/model/svm/{model_id_to_get}/details")
|
||||
r.raise_for_status()
|
||||
|
||||
self._model_details = r.json()
|
||||
@ -97,7 +103,7 @@ class SoundPreProcessor(AbcPreProcessor):
|
||||
|
||||
logging.info("Running classification...")
|
||||
|
||||
target_id = self._classes.index('chirp') # Might raise ValueError
|
||||
target_id = self._classes.index(config.SVM_TARGET_CLASS_NAME) # Might raise ValueError
|
||||
|
||||
feature_vector = (mid_features - self._mean) / self._std
|
||||
class_id, probability = classifier_wrapper(self._classifier, self._model_details['type'], feature_vector)
|
||||
|
Reference in New Issue
Block a user