Ouiam123 commited on
Commit
6fb7d33
·
verified ·
1 Parent(s): 4b37d2b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -7,9 +7,10 @@ from dotenv import load_dotenv
7
  # Load environment variables
8
  load_dotenv()
9
 
10
- # Set a writable cache directory
11
- os.environ["TRANSFORMERS_CACHE"] = "/tmp/huggingface_cache"
12
- os.makedirs(os.environ["TRANSFORMERS_CACHE"], exist_ok=True)
 
13
 
14
  # Retrieve the Hugging Face API token from environment variables
15
  api_token = os.getenv("ttt")
 
7
  # Load environment variables
8
  load_dotenv()
9
 
10
+ # Explicitly set a writable cache directory
11
+ writable_cache_dir = "/tmp/huggingface_cache"
12
+ os.environ["TRANSFORMERS_CACHE"] = writable_cache_dir
13
+ os.makedirs(writable_cache_dir, exist_ok=True)
14
 
15
  # Retrieve the Hugging Face API token from environment variables
16
  api_token = os.getenv("ttt")