Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -145,14 +145,18 @@ def test(input_json):
|
|
145 |
attributeMapperDict_gh = inputs['input']["attributeMapperDict"]
|
146 |
landuseMapperDict_gh = inputs['input']["landuseMapperDict"]
|
147 |
|
|
|
|
|
|
|
|
|
148 |
if not inputs['input']["alpha"]:
|
149 |
-
|
150 |
else:
|
151 |
alpha = inputs['input']["alpha"]
|
152 |
alpha = float(alpha)
|
153 |
|
154 |
if not inputs['input']["threshold"]:
|
155 |
-
|
156 |
else:
|
157 |
threshold = inputs['input']["threshold"]
|
158 |
threshold = float(threshold)
|
@@ -242,7 +246,8 @@ def test(input_json):
|
|
242 |
"luDomainMapper": landuseMapperDict,
|
243 |
"attributeMapper": livabilityMapperDict,
|
244 |
"fetchDm": dm_dictionary,
|
245 |
-
"landuses":df_lu_filtered_dict
|
|
|
246 |
}
|
247 |
|
248 |
|
|
|
145 |
attributeMapperDict_gh = inputs['input']["attributeMapperDict"]
|
146 |
landuseMapperDict_gh = inputs['input']["landuseMapperDict"]
|
147 |
|
148 |
+
|
149 |
+
from imports_utils import alpha as alphaDefault
|
150 |
+
from imports_utils import threshold as thresholdDefault
|
151 |
+
|
152 |
if not inputs['input']["alpha"]:
|
153 |
+
alpha = alphaDefault
|
154 |
else:
|
155 |
alpha = inputs['input']["alpha"]
|
156 |
alpha = float(alpha)
|
157 |
|
158 |
if not inputs['input']["threshold"]:
|
159 |
+
threshold = thresholdDefault
|
160 |
else:
|
161 |
threshold = inputs['input']["threshold"]
|
162 |
threshold = float(threshold)
|
|
|
246 |
"luDomainMapper": landuseMapperDict,
|
247 |
"attributeMapper": livabilityMapperDict,
|
248 |
"fetchDm": dm_dictionary,
|
249 |
+
"landuses":df_lu_filtered_dict,
|
250 |
+
"constants": [alpha, threshold]
|
251 |
}
|
252 |
|
253 |
|