Spaces:
Runtime error
Runtime error
Commit ·
7de2433
1
Parent(s): c7c971e
need_recalc if no file for recalc
Browse files
app.py
CHANGED
|
@@ -130,10 +130,10 @@ if __name__ == "__main__":
|
|
| 130 |
try:
|
| 131 |
with open(PERSISTENT_FILE_CHECK_PATH, "r", encoding="utf-8") as f:
|
| 132 |
need_recalc = f.read() == "1"
|
| 133 |
-
with open(PERSISTENT_FILE_CHECK_PATH, "w", encoding="utf-8") as f:
|
| 134 |
-
f.write("0")
|
| 135 |
except FileNotFoundError:
|
| 136 |
-
|
|
|
|
|
|
|
| 137 |
|
| 138 |
if need_recalc:
|
| 139 |
API.upload_file(
|
|
|
|
| 130 |
try:
|
| 131 |
with open(PERSISTENT_FILE_CHECK_PATH, "r", encoding="utf-8") as f:
|
| 132 |
need_recalc = f.read() == "1"
|
|
|
|
|
|
|
| 133 |
except FileNotFoundError:
|
| 134 |
+
need_recalc = True
|
| 135 |
+
with open(PERSISTENT_FILE_CHECK_PATH, "w", encoding="utf-8") as f:
|
| 136 |
+
f.write("0")
|
| 137 |
|
| 138 |
if need_recalc:
|
| 139 |
API.upload_file(
|