rodrigomasini commited on
Commit
9e7be30
1 Parent(s): 985f2ba

Update app_v3.py

Browse files
Files changed (1) hide show
  1. app_v3.py +2 -2
app_v3.py CHANGED
@@ -11,9 +11,9 @@ cwd = os.getcwd()
11
  quantized_model_dir = cwd + "/Jackson2-4bit-128g-GPTQ"
12
 
13
  # Check if the model directory is empty (i.e., model not downloaded yet)
14
- if not os.listdir(quantized_model_dir):
15
  # Create the cache directory if it doesn't exist
16
- os.makedirs(quantized_model_dir)
17
  snapshot_download(repo_id=pretrained_model_dir, local_dir=quantized_model_dir, local_dir_use_symlinks=True)
18
 
19
  st.write(f'{os.listdir(quantized_model_dir)}')
 
11
  quantized_model_dir = cwd + "/Jackson2-4bit-128g-GPTQ"
12
 
13
  # Check if the model directory is empty (i.e., model not downloaded yet)
14
+ if not os.path.exists(quantized_model_dir) or not os.listdir(quantized_model_dir):
15
  # Create the cache directory if it doesn't exist
16
+ os.makedirs(quantized_model_dir, exist_ok=True)
17
  snapshot_download(repo_id=pretrained_model_dir, local_dir=quantized_model_dir, local_dir_use_symlinks=True)
18
 
19
  st.write(f'{os.listdir(quantized_model_dir)}')