Jofthomas HF staff commited on
Commit
afaa295
1 Parent(s): d53e09c

Update coqui.py

Browse files
Files changed (1) hide show
  1. coqui.py +3 -0
coqui.py CHANGED
@@ -52,6 +52,9 @@ ModelManager().download_model(model_name)
52
  model_path = os.path.join(get_user_data_dir("tts"), model_name.replace("/", "--"))
53
  print("XTTS downloaded")
54
 
 
 
 
55
  # Ensure the model directory and files have the correct permissions
56
  if not os.access(model_path, os.W_OK):
57
  raise PermissionError(f"Write permission denied for model directory: {model_path}")
 
52
  model_path = os.path.join(get_user_data_dir("tts"), model_name.replace("/", "--"))
53
  print("XTTS downloaded")
54
 
55
+ # Ensure the model path and its contents are accessible
56
+ os.system(f'chown -R appuser:appgroup {model_path}')
57
+ os.system(f'chmod -R 755 {model_path}')
58
  # Ensure the model directory and files have the correct permissions
59
  if not os.access(model_path, os.W_OK):
60
  raise PermissionError(f"Write permission denied for model directory: {model_path}")