Spaces:
Runtime error
Runtime error
Commit ·
f64d553
1
Parent(s): 4a842c4
removing pesistent storage example from app.py
Browse files
app.py
CHANGED
|
@@ -7,27 +7,9 @@ import sqlparse
|
|
| 7 |
import re
|
| 8 |
import os
|
| 9 |
import warnings
|
| 10 |
-
from persistStorage import saveLog
|
| 11 |
-
|
| 12 |
-
#testing persistent storage of space
|
| 13 |
-
import os
|
| 14 |
-
|
| 15 |
-
# Get the path to the persistent storage directory
|
| 16 |
-
data_dir = os.getenv("HF_HOME", "/data")
|
| 17 |
-
|
| 18 |
-
# Create a new file
|
| 19 |
-
with open(os.path.join(data_dir, "my_data.txt"), "w") as f:
|
| 20 |
-
f.write("Hello World! From pesistent storage")
|
| 21 |
-
|
| 22 |
-
# Read the data from the file
|
| 23 |
-
with open(os.path.join(data_dir, "my_data.txt"), "r") as f:
|
| 24 |
-
data = f.read()
|
| 25 |
-
# Print the data
|
| 26 |
-
print(data)
|
| 27 |
-
|
| 28 |
-
|
| 29 |
|
| 30 |
|
|
|
|
| 31 |
from config import *
|
| 32 |
from constants import *
|
| 33 |
from utils import *
|
|
|
|
| 7 |
import re
|
| 8 |
import os
|
| 9 |
import warnings
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
|
| 11 |
|
| 12 |
+
from persistStorage import saveLog
|
| 13 |
from config import *
|
| 14 |
from constants import *
|
| 15 |
from utils import *
|