Skip to content

Commit 9cb08bd

Browse files
committed
Patch: fix case when input is only one point
1 parent 7a74614 commit 9cb08bd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

service.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ def predict():
115115
input = json.loads(flask.request.data or '{}')
116116
if isinstance(input, dict):
117117
samples = input.get('_samples', None)
118-
input = input.get('_data', {})
118+
data = input.get('_data', {})
119+
if len(data.items()):
120+
input = data
119121
else:
120122
samples = None
121123
# Predict

0 commit comments

Comments
 (0)