Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,9 +33,9 @@ else:
|
|
33 |
# changing CWD and input output folders
|
34 |
os.chdir(format(config_object['CONFIG']['CWD']))
|
35 |
|
36 |
-
DATA = os.getcwd() + '
|
37 |
-
OUT = os.getcwd() + '
|
38 |
-
TEMP = os.getcwd() + '
|
39 |
|
40 |
|
41 |
#######################################################################################################
|
@@ -49,9 +49,9 @@ github_repo = "GID-Project"
|
|
49 |
file_path_github = "main/data/Input/gadm41_DEU_1.json"
|
50 |
token = "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"
|
51 |
|
52 |
-
local_file_path = DATA + '
|
53 |
|
54 |
-
output_file = TEMP + '
|
55 |
|
56 |
# load locally
|
57 |
geojson_data = gpd.read_file(local_file_path)
|
@@ -61,7 +61,7 @@ geojson_data = gpd.read_file(local_file_path)
|
|
61 |
##################################################################################
|
62 |
# Function that enables testing
|
63 |
##################################################################################
|
64 |
-
table_main = pd.read_csv(TEMP + '
|
65 |
|
66 |
def AskAI(ques, lv, table_main = table_main):
|
67 |
level = int(lv) # Currently placeholder
|
@@ -70,7 +70,7 @@ def AskAI(ques, lv, table_main = table_main):
|
|
70 |
return(ans)
|
71 |
|
72 |
def AskAI_easy(ques):
|
73 |
-
Tmain = pd.read_csv(TEMP + '
|
74 |
blub = str(AskAI(ques,1,Tmain))
|
75 |
return(blub)
|
76 |
#######################################################################################
|
|
|
33 |
# changing CWD and input output folders
|
34 |
os.chdir(format(config_object['CONFIG']['CWD']))
|
35 |
|
36 |
+
DATA = os.getcwd() + '/' + format(config_object['CONFIG']['Input'])
|
37 |
+
OUT = os.getcwd() + '/' + format(config_object['CONFIG']['Output'])
|
38 |
+
TEMP = os.getcwd() + '/' + format(config_object['CONFIG']['Temp'])
|
39 |
|
40 |
|
41 |
#######################################################################################################
|
|
|
49 |
file_path_github = "main/data/Input/gadm41_DEU_1.json"
|
50 |
token = "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"
|
51 |
|
52 |
+
local_file_path = DATA + '/' + 'gadm41_DEU_1.json'
|
53 |
|
54 |
+
output_file = TEMP + '/' + 'gadm41_DEU_1'
|
55 |
|
56 |
# load locally
|
57 |
geojson_data = gpd.read_file(local_file_path)
|
|
|
61 |
##################################################################################
|
62 |
# Function that enables testing
|
63 |
##################################################################################
|
64 |
+
table_main = pd.read_csv(TEMP + '/' + 'gadm41_DEU_1_main').astype(str)
|
65 |
|
66 |
def AskAI(ques, lv, table_main = table_main):
|
67 |
level = int(lv) # Currently placeholder
|
|
|
70 |
return(ans)
|
71 |
|
72 |
def AskAI_easy(ques):
|
73 |
+
Tmain = pd.read_csv(TEMP + '/' + 'gadm41_DEU_1_main').astype(str)
|
74 |
blub = str(AskAI(ques,1,Tmain))
|
75 |
return(blub)
|
76 |
#######################################################################################
|