Ouiam123 commited on
Commit
4b37d2b
·
verified ·
1 Parent(s): 9d9a426

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -0
app.py CHANGED
@@ -7,6 +7,10 @@ from dotenv import load_dotenv
7
  # Load environment variables
8
  load_dotenv()
9
 
 
 
 
 
10
  # Retrieve the Hugging Face API token from environment variables
11
  api_token = os.getenv("ttt")
12
  if not api_token:
 
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")
16
  if not api_token: