Fixed API urls
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Pünkösd Marcell 2020-09-30 05:26:21 +02:00
parent 9a6852c2c0
commit 7ec2b3255d

View File

@ -32,20 +32,20 @@ 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/$default/details")
r = requests.get(f"{config.API_URL}/model/svm/$default/details")
r.raise_for_status()
self._model_details = r.json()
logging.debug("Downloading model...")
r = requests.get(f"{config.API_URL}/model/{self._model_details['id']}")
r = requests.get(f"{config.API_URL}/model/svm/{self._model_details['id']}")
r.raise_for_status()
with open(self._temp_model_name, 'wb') as f:
f.write(r.content)
logging.debug("Downloading MEANS...")
r = requests.get(f"{config.API_URL}/model/{self._model_details['id']}?means")
r = requests.get(f"{config.API_URL}/model/svm/{self._model_details['id']}?means")
r.raise_for_status()
with open(self._temp_means_name, 'wb') as f: