use proper system logging
diff --git a/ml/classifiers.py b/ml/classifiers.py
index 8bbd2c5..3b894d0 100644
--- a/ml/classifiers.py
+++ b/ml/classifiers.py
@@ -79,9 +79,7 @@
for key, value in data.items():
if type(value) == str:
data[key] = value
-
- print(data)
-
+
data = pd.DataFrame(data, index=[0])
# fill missing values
diff --git a/server/wsgi.py b/server/wsgi.py
index d598b3e..8002871 100644
--- a/server/wsgi.py
+++ b/server/wsgi.py
@@ -33,6 +33,7 @@
https://docs.djangoproject.com/en/2.1/howto/deployment/wsgi/
"""
+import logging
import os
import sys
import joblib
@@ -42,6 +43,8 @@
from ml.registry import MLRegistry
from ml.classifiers import GradientBoostClassifier, MLP, RandomForestClassifier, SVC
+log = logging.getLogger(__name__)
+
os.environ.setdefault(
'DJANGO_SETTINGS_MODULE',
'server.settings')
@@ -105,5 +108,5 @@
'created_by': "xurror"}])
except Exception as e:
- print("Exception while loading the algorithms to the registry,", str(e))
+ log.debug(f"Exception while loading the algorithms to the registry; {str(e)}")
exit()