Added ability to store CNN models
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-07-28 20:19:52 +02:00
parent fe965706b5
commit 284dfce735
12 changed files with 224 additions and 67 deletions

View File

@@ -11,7 +11,7 @@ from model import db
from utils import register_all_error_handlers, storage
# import views
from views import ModelView
from views import SVMView, CNNView
# Setup sentry
SENTRY_DSN = os.environ.get("SENTRY_DSN")
@@ -32,8 +32,8 @@ app.config['SQLALCHEMY_DATABASE_URI'] = os.environ.get('DATABASE_URI', "sqlite:/
app.config['MINIO_ENDPOINT'] = os.environ['MINIO_ENDPOINT']
app.config['MINIO_ACCESS_KEY'] = os.environ['MINIO_ACCESS_KEY']
app.config['MINIO_SECRET_KEY'] = os.environ['MINIO_SECRET_KEY']
app.config['MINIO_MODEL_BUCKET_NAME'] = os.environ['MINIO_MODEL_BUCKET_NAME']
app.config['MINIO_MEANS_BUCKET_NAME'] = os.environ['MINIO_MEANS_BUCKET_NAME']
app.config['MINIO_SVM_BUCKET_NAME'] = os.environ['MINIO_SVM_BUCKET_NAME']
app.config['MINIO_CNN_BUCKET_NAME'] = os.environ['MINIO_CNN_BUCKET_NAME']
app.config['MINIO_SECURE'] = os.environ.get('MINIO_SECURE', False)
app.config['MINIO_REGION'] = os.environ.get('MINIO_REGION', None)
@@ -53,8 +53,8 @@ with app.app_context():
register_all_error_handlers(app)
# register views
for view in [ModelView]:
view.register(app, trailing_slash=False)
for view in [SVMView, CNNView]:
view.register(app, trailing_slash=False, route_prefix='/model')
# start debuggig if needed
if __name__ == "__main__":