FFomy commited on
Commit
9c07b4e
·
verified ·
1 Parent(s): 4a8414a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
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
- if REPO_TYPE == "hf":
9
- from huggingface_hub import snapshot_download
10
- else:
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=REPO_TYPE,
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."