DeepLearning101 commited on
Commit
a34a59d
·
verified ·
1 Parent(s): d6f4479

Update DPTNet_eval/DPTNet_quant_sep.py

Browse files
Files changed (1) hide show
  1. DPTNet_eval/DPTNet_quant_sep.py +8 -9
DPTNet_eval/DPTNet_quant_sep.py CHANGED
@@ -36,17 +36,16 @@ def get_conf():
36
  def load_dpt_model():
37
  print('Load Separation Model...')
38
 
39
- # 從環境變數取得 Hugging Face Token
40
- HF_TOKEN = os.getenv("SpeechSeparation")
41
- if not HF_TOKEN:
42
- raise EnvironmentError("環境變數 HF_TOKEN 未設定!請先執行 export HF_TOKEN=xxx")
43
 
44
- # 從 Hugging Face Hub 下載模型權重
45
  model_path = hf_hub_download(
46
- repo_id="DeepLearning101/speech-separation", # ← 替換成你的 repo 名稱
47
- filename="train_dptnet_aishell_partOverlap_B6_300epoch_quan-int8.p",
48
- token=SpeechSeparation
49
- )
50
 
51
  # 取得模型參數
52
  conf_filterbank, conf_masknet = get_conf()
 
36
  def load_dpt_model():
37
  print('Load Separation Model...')
38
 
39
+ # 從環境變數取得你設定的 Secret 名稱為 SpeechSeparation
40
+ speech_sep_token = os.getenv("SpeechSeparation")
41
+ if not speech_sep_token:
42
+ raise EnvironmentError("環境變數 SpeechSeparation 未設定!")
43
 
 
44
  model_path = hf_hub_download(
45
+ repo_id="DeepLearning101/speech-separation",
46
+ filename="train_dptnet_aishell_partOverlap_B2_300epoch_quan-int8.p",
47
+ token=speech_sep_token # ✅ 使用你設定的 Secret
48
+ )
49
 
50
  # 取得模型參數
51
  conf_filterbank, conf_masknet = get_conf()