Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -5,10 +5,9 @@ REPO_TYPE = "hf"
|
|
| 5 |
if REPO_TYPE not in ["hf", "ms"]:
|
| 6 |
raise ValueError("REPO_TYPE must be either 'hf' for Hugging Face or 'ms' for ModelScope.")
|
| 7 |
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
from modelscope.hub.snapshot_download import snapshot_download
|
| 12 |
|
| 13 |
|
| 14 |
# 1. 定义本地路径和远程仓库ID
|
|
@@ -504,7 +503,7 @@ def transcribe_audio(audio_input, audio_url, proxy_url, proxy_username, proxy_pa
|
|
| 504 |
vad_kwargs={"max_single_segment_time": 30000},
|
| 505 |
device=device,
|
| 506 |
disable_update=True,
|
| 507 |
-
hub=
|
| 508 |
)
|
| 509 |
else:
|
| 510 |
error_msg = "Invalid pipeline type. Only 'sensevoice' is supported."
|
|
|
|
| 5 |
if REPO_TYPE not in ["hf", "ms"]:
|
| 6 |
raise ValueError("REPO_TYPE must be either 'hf' for Hugging Face or 'ms' for ModelScope.")
|
| 7 |
|
| 8 |
+
|
| 9 |
+
from huggingface_hub import snapshot_download
|
| 10 |
+
|
|
|
|
| 11 |
|
| 12 |
|
| 13 |
# 1. 定义本地路径和远程仓库ID
|
|
|
|
| 503 |
vad_kwargs={"max_single_segment_time": 30000},
|
| 504 |
device=device,
|
| 505 |
disable_update=True,
|
| 506 |
+
hub='ms',
|
| 507 |
)
|
| 508 |
else:
|
| 509 |
error_msg = "Invalid pipeline type. Only 'sensevoice' is supported."
|