xiaoyao9184 commited on
Commit
d52f760
·
verified ·
1 Parent(s): d7deabd

Synced repo using 'sync_with_huggingface' Github Action

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -109,14 +109,21 @@ class Config:
109
  cache_dir = os.getenv("HUGGINGFACE_HUB_CACHE") or os.getenv("CACHE_DIR") or "./cache"
110
  log_dir = os.getenv("LOG_DIR") or "./logs"
111
 
 
 
 
 
 
 
 
112
  return cls(
113
  hf_token=system_token,
114
  hf_username=hf_username,
115
  is_using_user_token=False,
116
  ignore_converted=os.getenv("IGNORE_CONVERTED", "false") == "true",
117
- output_path=Path(output_dir),
118
- cache_path=Path(cache_dir),
119
- log_path=Path(log_dir)
120
  )
121
 
122
  @property
 
109
  cache_dir = os.getenv("HUGGINGFACE_HUB_CACHE") or os.getenv("CACHE_DIR") or "./cache"
110
  log_dir = os.getenv("LOG_DIR") or "./logs"
111
 
112
+ output_path = Path(output_dir)
113
+ output_path.mkdir(exist_ok=True)
114
+ cache_path = Path(cache_dir)
115
+ cache_path.mkdir(exist_ok=True)
116
+ log_path = Path(log_dir)
117
+ log_path.mkdir(exist_ok=True)
118
+
119
  return cls(
120
  hf_token=system_token,
121
  hf_username=hf_username,
122
  is_using_user_token=False,
123
  ignore_converted=os.getenv("IGNORE_CONVERTED", "false") == "true",
124
+ output_path=output_path,
125
+ cache_path=cache_path,
126
+ log_path=log_path
127
  )
128
 
129
  @property