Spaces:
Sleeping
Sleeping
bofenghuang
commited on
Commit
·
120532c
1
Parent(s):
62d5a58
up
Browse files- run_demo_openai.py +3 -1
run_demo_openai.py
CHANGED
@@ -36,7 +36,9 @@ GEN_KWARGS = {
|
|
36 |
# "no_speech_threshold": None,
|
37 |
}
|
38 |
|
39 |
-
device = 0 if torch.cuda.is_available() else "cpu"
|
|
|
|
|
40 |
|
41 |
downloaded_model_path = hf_hub_download(repo_id=MODEL_NAME, filename=CHECKPOINT_FILENAME)
|
42 |
|
|
|
36 |
# "no_speech_threshold": None,
|
37 |
}
|
38 |
|
39 |
+
# device = 0 if torch.cuda.is_available() else "cpu"
|
40 |
+
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
|
41 |
+
|
42 |
|
43 |
downloaded_model_path = hf_hub_download(repo_id=MODEL_NAME, filename=CHECKPOINT_FILENAME)
|
44 |
|