Skip to content

Commit d6cd3a2

Browse files
committed
Merge branch 'master' of https://github.com/lopezco/ml-flask-api into refactor-to-integrate-more-models
2 parents fc3c376 + 0fce2fd commit d6cd3a2

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ $ curl -X GET http://localhost:5000/service-info
140140
"running-since": 1563355369.6482198,
141141
"serving-model-name": "model.joblib",
142142
"serving-model-type": "SKLEARN_MODEL",
143-
"version-template": "1.4.0"
143+
"version-template": "1.4.1"
144144
}
145145
```
146146

docsrc/source/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@
2525
author = 'lopezco'
2626

2727
# The short X.Y version
28-
version = '1.4.0'
28+
version = '1.4.1'
2929
# The full version, including alpha/beta/rc tags
30-
release = '1.4.0'
30+
release = '1.4.1'
3131

3232

3333
# -- General configuration ---------------------------------------------------

service.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from python.factory import ModelFactory
1616

1717
# Version of this APP template
18-
__version__ = '1.4.0'
18+
__version__ = '1.4.1'
1919
# Read env variables
2020
DEBUG = os.environ.get('DEBUG', True)
2121
MODEL_NAME = os.environ.get('MODEL_NAME', 'model.joblib')
@@ -72,7 +72,9 @@ def predict():
7272
input = json.loads(flask.request.data or '{}')
7373
if isinstance(input, dict):
7474
samples = input.get('_samples', None)
75-
input = input.get('_data', {})
75+
data = input.get('_data', {})
76+
if len(data.items()):
77+
input = data
7678
else:
7779
samples = None
7880
# Predict

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[bumpversion]
2-
current_version = 1.4.0
2+
current_version = 1.4.1
33
commit = True
44
tag = True
55

0 commit comments

Comments
 (0)