Skip to content
This repository was archived by the owner on Jul 20, 2025. It is now read-only.

Commit 8a72a9a

Browse files
committed
Fix variable typos & explicitly allow external serving
1 parent dc98568 commit 8a72a9a

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

mpds_ml_labs/app.py

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -218,13 +218,13 @@ def design():
218218
for k, v in answer_props.items():
219219
aux_info.append([
220220
prop_models[k]['name'].replace(' ', '_'),
221-
sample[k + '_min'],
221+
user_ranges_dict[k + '_min'],
222222
v,
223-
sample[k + '_max'],
223+
user_ranges_dict[k + '_max'],
224224
prop_models[k]['units']
225225
])
226-
tol = (sample[k + '_max'] - sample[k + '_min']) * TOL_QUALITY
227-
if sample[k + '_min'] - tol < v < sample[k + '_max'] + tol:
226+
tol = (user_ranges_dict[k + '_max'] - user_ranges_dict[k + '_min']) * TOL_QUALITY
227+
if user_ranges_dict[k + '_min'] - tol < v < user_ranges_dict[k + '_max'] + tol:
228228
result_quality += 1
229229

230230
return Response(
@@ -263,3 +263,5 @@ def design():
263263

264264
# NB an external WSGI-compliant server is a must
265265
# while exposing to the outer world
266+
267+
else: active_ml_models = load_ml_models(ML_MODELS)

0 commit comments

Comments
 (0)