Added saving target class name
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-10-01 19:38:34 +02:00
parent bafd6be131
commit 62ea95cfe4
4 changed files with 7 additions and 5 deletions

View File

@ -48,10 +48,7 @@ class CNNView(FlaskView):
ensure_buckets()
# Create the entry in the db
if info['id']:
m = AIModel(id=info['id'], type=AIModelType.CNN)
else:
m = AIModel(type=AIModelType.CNN)
m = AIModel(id=info['id'], type=AIModelType.CNN, target_class_name=info['target_class_name'])
# Put files into MinIO
storage.connection.put_object(current_app.config['MINIO_CNN_BUCKET_NAME'], "model/" + str(m.id), model_file,

View File

@ -81,7 +81,7 @@ class SVMView(FlaskView):
os.remove(temp_model_filename)
os.remove(temp_means_filename)
m = AIModel(id=info['id'], type=AIModelType.SVM)
m = AIModel(id=info['id'], type=AIModelType.SVM, target_class_name=info['target_class_name'])
d = SVMDetails(
aimodel=m,