Spaces:
Running
Running
Upload main.py
Browse files
main.py
CHANGED
@@ -11,7 +11,7 @@ def home():
|
|
11 |
@app.route("/get_states")
|
12 |
def get():
|
13 |
states = os.listdir("./states")
|
14 |
-
states = sorted(states, key=lambda x: os.path.getmtime(os.path.join(
|
15 |
states_parse = []
|
16 |
for s in states:
|
17 |
states_parse.append({"id":s, "text":open(f"./states/{s}/text", "r").read()})
|
|
|
11 |
@app.route("/get_states")
|
12 |
def get():
|
13 |
states = os.listdir("./states")
|
14 |
+
states = sorted(states, key=lambda x: os.path.getmtime(os.path.join("./states", x)), reverse=True)
|
15 |
states_parse = []
|
16 |
for s in states:
|
17 |
states_parse.append({"id":s, "text":open(f"./states/{s}/text", "r").read()})
|