Spaces:
Sleeping
Sleeping
nastasiasnk
commited on
Commit
•
4eb5c38
1
Parent(s):
8da1c2e
Update app.py
Browse files
app.py
CHANGED
@@ -10,29 +10,32 @@ import os
|
|
10 |
|
11 |
|
12 |
from notion_client import Client as client_notion
|
13 |
-
from config import landuseDatabaseId , subdomainAttributesDatabaseId
|
14 |
from imports_utils import fetch_all_database_pages
|
15 |
from imports_utils import get_property_value
|
16 |
#from imports_utils import notion
|
17 |
from imports_utils import getDataFromNotion
|
|
|
|
|
18 |
|
|
|
|
|
|
|
|
|
19 |
from config import landuseColumnName
|
20 |
from config import subdomainColumnName
|
21 |
from config import sqmPerEmployeeColumnName
|
22 |
from config import thresholdsColumnName
|
23 |
from config import maxPointsColumnName
|
24 |
from config import domainColumnName
|
25 |
-
#from imports_utils import fetchDomainMapper
|
26 |
-
#from imports_utils import fetchSubdomainMapper
|
27 |
|
28 |
-
|
29 |
-
|
30 |
|
31 |
if notionToken is None:
|
32 |
raise Exception("Notion token not found. Please check the environment variables.")
|
33 |
else:
|
34 |
print("Notion token found successfully!")
|
35 |
-
if useNotionData
|
36 |
notion = client_notion(auth=notionToken)
|
37 |
landuseMapperDict, livabilityMapperDict = getDataFromNotion(
|
38 |
notion=notion,
|
|
|
10 |
|
11 |
|
12 |
from notion_client import Client as client_notion
|
|
|
13 |
from imports_utils import fetch_all_database_pages
|
14 |
from imports_utils import get_property_value
|
15 |
#from imports_utils import notion
|
16 |
from imports_utils import getDataFromNotion
|
17 |
+
#from imports_utils import fetchDomainMapper
|
18 |
+
#from imports_utils import fetchSubdomainMapper
|
19 |
|
20 |
+
from imports_utils import notionToken
|
21 |
+
|
22 |
+
from config import useNotionData
|
23 |
+
from config import landuseDatabaseId , subdomainAttributesDatabaseId
|
24 |
from config import landuseColumnName
|
25 |
from config import subdomainColumnName
|
26 |
from config import sqmPerEmployeeColumnName
|
27 |
from config import thresholdsColumnName
|
28 |
from config import maxPointsColumnName
|
29 |
from config import domainColumnName
|
|
|
|
|
30 |
|
31 |
+
landuseMapperDict = {}
|
32 |
+
livabilityMapperDict={}
|
33 |
|
34 |
if notionToken is None:
|
35 |
raise Exception("Notion token not found. Please check the environment variables.")
|
36 |
else:
|
37 |
print("Notion token found successfully!")
|
38 |
+
if useNotionData:
|
39 |
notion = client_notion(auth=notionToken)
|
40 |
landuseMapperDict, livabilityMapperDict = getDataFromNotion(
|
41 |
notion=notion,
|