Spaces:
Running
on
A100
Running
on
A100
Update app.py
Browse filesCreates parent directories if they don't exist, otherwise I get the error:
```
Exception in thread Thread-3:
Traceback (most recent call last):
File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/spaces/YuE/.venv/lib/python3.10/site-packages/gradio/utils.py", line 285, in watchfn
exec(no_reload_source_code, module.__dict__)
File "/spaces/YuE/app.py", line 33, in <module>
os.mkdir(folder_path)
FileNotFoundError: [Errno 2] No such file or directory: './inference/xcodec_mini_infer'
```
app.py
CHANGED
@@ -30,7 +30,7 @@ folder_path = './inference/xcodec_mini_infer'
|
|
30 |
|
31 |
# Create the folder if it doesn't exist
|
32 |
if not os.path.exists(folder_path):
|
33 |
-
os.
|
34 |
print(f"Folder created at: {folder_path}")
|
35 |
else:
|
36 |
print(f"Folder already exists at: {folder_path}")
|
|
|
30 |
|
31 |
# Create the folder if it doesn't exist
|
32 |
if not os.path.exists(folder_path):
|
33 |
+
os.makedirs(folder_path)
|
34 |
print(f"Folder created at: {folder_path}")
|
35 |
else:
|
36 |
print(f"Folder already exists at: {folder_path}")
|