Spaces:
Running
on
Zero
Running
on
Zero
Commit
·
bc2c7b3
1
Parent(s):
86d5e88
else condition is absent. this is causing an issue while running in colab.
Browse files_folder can be None. when the value is None, should not proceed for function calling with None value.
- gallery_history.py +1 -1
gallery_history.py
CHANGED
@@ -28,7 +28,7 @@ if _folder is None:
|
|
28 |
"locally and will be lost when the Space instance is restarted."
|
29 |
)
|
30 |
_folder = Path(__file__).parent / "history"
|
31 |
-
|
32 |
print(
|
33 |
f"'HISTORY_FOLDER' environment variable is set to '{_folder}' which doesn't exist. User history will be saved "
|
34 |
"locally and will be lost when the Space instance is restarted."
|
|
|
28 |
"locally and will be lost when the Space instance is restarted."
|
29 |
)
|
30 |
_folder = Path(__file__).parent / "history"
|
31 |
+
elif _folder.startswith("/data") and not os.path.exists("/data"):
|
32 |
print(
|
33 |
f"'HISTORY_FOLDER' environment variable is set to '{_folder}' which doesn't exist. User history will be saved "
|
34 |
"locally and will be lost when the Space instance is restarted."
|