Spaces:
Runtime error
Runtime error
ncoop57
commited on
Commit
·
898b5fd
1
Parent(s):
50e6fbc
Make path a Path obj
Browse files
app.py
CHANGED
@@ -9,8 +9,8 @@ from pathlib import Path
|
|
9 |
# get secret environment variable
|
10 |
token = os.environ["HF_TOKEN"]
|
11 |
# write to disk
|
12 |
-
path = "./huggingface"
|
13 |
-
|
14 |
with open(path/"token", "w") as f:
|
15 |
f.write(token)
|
16 |
|
|
|
9 |
# get secret environment variable
|
10 |
token = os.environ["HF_TOKEN"]
|
11 |
# write to disk
|
12 |
+
path = Path("./huggingface")
|
13 |
+
path.mkdir(parents=True, exist_ok=True)
|
14 |
with open(path/"token", "w") as f:
|
15 |
f.write(token)
|
16 |
|