Spaces:
Runtime error
Runtime error
Update 2.py
Browse files
2.py
CHANGED
@@ -8,6 +8,20 @@ from tqdm import tqdm
|
|
8 |
|
9 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
10 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
class Config: E, H, N, C, B, M, S, V, W, L, D = 512, 32, 1024, 256, 128, 20000, 2048, 1e5, 4000, 2e-4, .15
|
12 |
|
13 |
class MyDataset(Dataset):
|
|
|
8 |
|
9 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
10 |
|
11 |
+
|
12 |
+
# Set the cache directory path
|
13 |
+
cache_dir = '/app/cache'
|
14 |
+
|
15 |
+
# Create the directory if it doesn't exist
|
16 |
+
if not os.path.exists(cache_dir):
|
17 |
+
os.makedirs(cache_dir)
|
18 |
+
|
19 |
+
# Set the environment variable
|
20 |
+
os.environ['HF_HOME'] = cache_dir
|
21 |
+
|
22 |
+
# Verify the environment variable is set
|
23 |
+
print(f"HF_HOME is set to: {os.environ['HF_HOME']}")
|
24 |
+
|
25 |
class Config: E, H, N, C, B, M, S, V, W, L, D = 512, 32, 1024, 256, 128, 20000, 2048, 1e5, 4000, 2e-4, .15
|
26 |
|
27 |
class MyDataset(Dataset):
|