Spaces:
Running
on
Zero
Running
on
Zero
wli3221134
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -8,13 +8,15 @@ from huggingface_hub import hf_hub_download
|
|
8 |
|
9 |
# 初始化设备
|
10 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
|
|
11 |
|
12 |
# 初始化模型
|
13 |
def load_model():
|
14 |
model = Wav2Vec2BERT_Llama().to(device)
|
15 |
checkpoint_path = hf_hub_download(
|
16 |
repo_id="amphion/deepfake_detection",
|
17 |
-
filename="checkpoints_wav2vec2bert_ft_llama_labels_ASVspoof2019_RandomPrompts_6/model_checkpoint.pth"
|
|
|
18 |
)
|
19 |
# checkpoint_path = "ckpt/model_checkpoint.pth"
|
20 |
if os.path.exists(checkpoint_path):
|
|
|
8 |
|
9 |
# 初始化设备
|
10 |
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
|
11 |
+
print('device:', device)
|
12 |
|
13 |
# 初始化模型
|
14 |
def load_model():
|
15 |
model = Wav2Vec2BERT_Llama().to(device)
|
16 |
checkpoint_path = hf_hub_download(
|
17 |
repo_id="amphion/deepfake_detection",
|
18 |
+
filename="checkpoints_wav2vec2bert_ft_llama_labels_ASVspoof2019_RandomPrompts_6/model_checkpoint.pth",
|
19 |
+
repo_type="model"
|
20 |
)
|
21 |
# checkpoint_path = "ckpt/model_checkpoint.pth"
|
22 |
if os.path.exists(checkpoint_path):
|