Krixter commited on
Commit
f3f3a0c
·
verified ·
1 Parent(s): 2dd5052

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -8,10 +8,9 @@ import tempfile
8
  HF_BUCKET = "hf://buckets/Krixter/storage"
9
 
10
  def get_fs():
11
- """Initialize the Hugging Face File System with the secret token."""
12
  token = os.environ.get("HF_TOKEN")
13
- if not token:
14
- raise ValueError("⚠️ HF_TOKEN secret is missing. Please add it to your Space settings.")
15
  return HfFileSystem(token=token)
16
 
17
  def format_size(size_bytes):
 
8
  HF_BUCKET = "hf://buckets/Krixter/storage"
9
 
10
  def get_fs():
11
+ """Initialize the Hugging Face File System. Uses a token if available, otherwise runs anonymously."""
12
  token = os.environ.get("HF_TOKEN")
13
+ # If there's no token, HfFileSystem will just run in public/anonymous mode
 
14
  return HfFileSystem(token=token)
15
 
16
  def format_size(size_bytes):