Spaces:
Sleeping
Sleeping
update
Browse files- main.py +6 -3
- requirements.txt +1 -0
main.py
CHANGED
@@ -10,7 +10,8 @@ from pathlib import Path
|
|
10 |
import platform
|
11 |
import time
|
12 |
import tempfile
|
13 |
-
import uuid
|
|
|
14 |
|
15 |
from project_settings import project_path, log_directory
|
16 |
import log
|
@@ -105,14 +106,16 @@ def process(
|
|
105 |
if len(repo_id.parts) == 1:
|
106 |
repo_name = repo_id.parts[-1]
|
107 |
if len(repo_name) > 40:
|
108 |
-
repo_name = str(uuid.uuid4())
|
|
|
109 |
# repo_name = repo_name[:40]
|
110 |
folder = repo_name
|
111 |
elif len(repo_id.parts) == 2:
|
112 |
repo_supplier = repo_id.parts[-2]
|
113 |
repo_name = repo_id.parts[-1]
|
114 |
if len(repo_name) > 40:
|
115 |
-
repo_name = str(uuid.uuid4())
|
|
|
116 |
# repo_name = repo_name[:40]
|
117 |
folder = "{}/{}".format(repo_supplier, repo_name)
|
118 |
else:
|
|
|
10 |
import platform
|
11 |
import time
|
12 |
import tempfile
|
13 |
+
# import uuid
|
14 |
+
import shortuuid
|
15 |
|
16 |
from project_settings import project_path, log_directory
|
17 |
import log
|
|
|
106 |
if len(repo_id.parts) == 1:
|
107 |
repo_name = repo_id.parts[-1]
|
108 |
if len(repo_name) > 40:
|
109 |
+
# repo_name = str(uuid.uuid4())
|
110 |
+
repo_name = str(shortuuid.uuid())
|
111 |
# repo_name = repo_name[:40]
|
112 |
folder = repo_name
|
113 |
elif len(repo_id.parts) == 2:
|
114 |
repo_supplier = repo_id.parts[-2]
|
115 |
repo_name = repo_id.parts[-1]
|
116 |
if len(repo_name) > 40:
|
117 |
+
# repo_name = str(uuid.uuid4())
|
118 |
+
repo_name = str(shortuuid.uuid())
|
119 |
# repo_name = repo_name[:40]
|
120 |
folder = "{}/{}".format(repo_supplier, repo_name)
|
121 |
else:
|
requirements.txt
CHANGED
@@ -4,6 +4,7 @@ torchaudio==0.13.1
|
|
4 |
librosa==0.8.1
|
5 |
numpy==1.22.0
|
6 |
sherpa-onnx>=1.9.21
|
|
|
7 |
|
8 |
data/wheels/k2-1.23.4.dev20230130+cpu.torch1.13.1-cp38-cp38-linux_x86_64.whl
|
9 |
data/wheels/k2_sherpa-1.1-cp38-cp38-linux_x86_64.whl
|
|
|
4 |
librosa==0.8.1
|
5 |
numpy==1.22.0
|
6 |
sherpa-onnx>=1.9.21
|
7 |
+
shortuuid==1.0.13
|
8 |
|
9 |
data/wheels/k2-1.23.4.dev20230130+cpu.torch1.13.1-cp38-cp38-linux_x86_64.whl
|
10 |
data/wheels/k2_sherpa-1.1-cp38-cp38-linux_x86_64.whl
|