Update handler.py
Browse files- handler.py +7 -1
handler.py
CHANGED
@@ -18,8 +18,14 @@ class EndpointHandler:
|
|
18 |
repo_url = "https://huggingface.co/mazalaai/TTS_Mongolian.git"
|
19 |
os.system(f"git clone {repo_url}")
|
20 |
|
21 |
-
#
|
22 |
repo_dir = "TTS_Mongolian"
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
dest_dir = "/repository"
|
24 |
for item in os.listdir(repo_dir):
|
25 |
item_path = os.path.join(repo_dir, item)
|
|
|
18 |
repo_url = "https://huggingface.co/mazalaai/TTS_Mongolian.git"
|
19 |
os.system(f"git clone {repo_url}")
|
20 |
|
21 |
+
# Rename the "lib" directory to "libb"
|
22 |
repo_dir = "TTS_Mongolian"
|
23 |
+
lib_dir = os.path.join(repo_dir, "lib")
|
24 |
+
libb_dir = os.path.join(repo_dir, "libb")
|
25 |
+
if os.path.exists(lib_dir):
|
26 |
+
os.rename(lib_dir, libb_dir)
|
27 |
+
|
28 |
+
# Copy all files from the cloned repository to the /repository directory
|
29 |
dest_dir = "/repository"
|
30 |
for item in os.listdir(repo_dir):
|
31 |
item_path = os.path.join(repo_dir, item)
|