Fixed directory creation
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Pünkösd Marcell 2020-09-16 19:55:21 +02:00
parent beaf53c7e0
commit b85502cf62
1 changed files with 2 additions and 1 deletions

View File

@ -43,6 +43,7 @@ class Classifier(object):
# Change extension to jpg... mert 110% biztos vagyok benne hogy a keras nem bírná beolvasni máshogy
file_name = os.path.join(target_dir, "unknown", f"{wav_basename[:-4]}.jpg")
os.mkdir(os.path.join(target_dir, "unknown"))
matplotlib.pyplot.savefig(file_name, dpi=400, bbox_inches='tight', pad_inches=0)
matplotlib.pyplot.close()
@ -50,7 +51,7 @@ class Classifier(object):
matplotlib.pyplot.close(fig)
matplotlib.pyplot.close('all')
return target_dir, file_name
return target_dir, file_name # Az unknown nélkülivel kell visszatérni
def _run_predictor(self, directory: str) -> list:
predict_generator = self.datagen.flow_from_directory(