Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -5,13 +5,13 @@ import numpy as np
|
|
5 |
|
6 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
7 |
|
8 |
-
device = "cpu"
|
9 |
torch_dtype = torch.float16 if device != "cpu" else torch.float32
|
10 |
|
11 |
print("Device:", device)
|
12 |
|
13 |
model_id = "openai/whisper-large-v3"
|
14 |
-
model_id = "openai/whisper-medium"
|
15 |
|
16 |
model = AutoModelForSpeechSeq2Seq.from_pretrained(
|
17 |
model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
|
|
|
5 |
|
6 |
device = "cuda:0" if torch.cuda.is_available() else "cpu"
|
7 |
|
8 |
+
#device = "cpu"
|
9 |
torch_dtype = torch.float16 if device != "cpu" else torch.float32
|
10 |
|
11 |
print("Device:", device)
|
12 |
|
13 |
model_id = "openai/whisper-large-v3"
|
14 |
+
#model_id = "openai/whisper-medium"
|
15 |
|
16 |
model = AutoModelForSpeechSeq2Seq.from_pretrained(
|
17 |
model_id, torch_dtype=torch_dtype, low_cpu_mem_usage=True, use_safetensors=True
|