Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
4f355f4
1
Parent(s):
4eb5c38
Update app.py
Browse files
app.py
CHANGED
@@ -28,8 +28,7 @@ from config import thresholdsColumnName
|
|
28 |
from config import maxPointsColumnName
|
29 |
from config import domainColumnName
|
30 |
|
31 |
-
|
32 |
-
livabilityMapperDict={}
|
33 |
|
34 |
if notionToken is None:
|
35 |
raise Exception("Notion token not found. Please check the environment variables.")
|
@@ -37,7 +36,7 @@ else:
|
|
37 |
print("Notion token found successfully!")
|
38 |
if useNotionData:
|
39 |
notion = client_notion(auth=notionToken)
|
40 |
-
|
41 |
notion=notion,
|
42 |
notionToken=notionToken,
|
43 |
landuseDatabaseID=landuseDatabaseId,
|
@@ -173,22 +172,11 @@ def test(input_json):
|
|
173 |
dfLanduses = df_lu.copy() # fetch speckl data or not
|
174 |
dfMatrix = df_dm.copy()
|
175 |
|
176 |
-
|
|
|
|
|
|
|
177 |
|
178 |
-
if not inputs['input']["alpha"]:
|
179 |
-
alpha = alphaDefault
|
180 |
-
else:
|
181 |
-
alpha = inputs['input']["alpha"]
|
182 |
-
alpha = float(alpha)
|
183 |
-
|
184 |
-
if not inputs['input']["threshold"]:
|
185 |
-
threshold = thresholdDefault
|
186 |
-
else:
|
187 |
-
threshold = inputs['input']["threshold"]
|
188 |
-
threshold = float(threshold)
|
189 |
-
"""
|
190 |
-
|
191 |
-
|
192 |
"""
|
193 |
valid_indexes = [idx for idx in mask_connected if idx in dfLanduses.index]
|
194 |
# Identify and report missing indexes
|
|
|
28 |
from config import maxPointsColumnName
|
29 |
from config import domainColumnName
|
30 |
|
31 |
+
|
|
|
32 |
|
33 |
if notionToken is None:
|
34 |
raise Exception("Notion token not found. Please check the environment variables.")
|
|
|
36 |
print("Notion token found successfully!")
|
37 |
if useNotionData:
|
38 |
notion = client_notion(auth=notionToken)
|
39 |
+
lu_mapperDict, subdomain_mapperDict = getDataFromNotion(
|
40 |
notion=notion,
|
41 |
notionToken=notionToken,
|
42 |
landuseDatabaseID=landuseDatabaseId,
|
|
|
172 |
dfLanduses = df_lu.copy() # fetch speckl data or not
|
173 |
dfMatrix = df_dm.copy()
|
174 |
|
175 |
+
|
176 |
+
|
177 |
+
landuseMapperDict = lu_mapperDict
|
178 |
+
livabilityMapperDict = subdomain_mapperDict
|
179 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
180 |
"""
|
181 |
valid_indexes = [idx for idx in mask_connected if idx in dfLanduses.index]
|
182 |
# Identify and report missing indexes
|