esf
Browse files
app.py
CHANGED
@@ -7,11 +7,12 @@ import tempfile
|
|
7 |
import os
|
8 |
|
9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
-
BATCH_SIZE =
|
11 |
FILE_LIMIT_MB = 1000
|
|
|
12 |
YT_LENGTH_LIMIT_S = 3600 # limit to 1 hour YouTube files
|
13 |
|
14 |
-
model = whisperx.load_model("large-v2", device)
|
15 |
|
16 |
@spaces.GPU
|
17 |
def transcribe(inputs, task):
|
|
|
7 |
import os
|
8 |
|
9 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
10 |
+
BATCH_SIZE = 4
|
11 |
FILE_LIMIT_MB = 1000
|
12 |
+
COMPUTE_TYPE = "float32"
|
13 |
YT_LENGTH_LIMIT_S = 3600 # limit to 1 hour YouTube files
|
14 |
|
15 |
+
model = whisperx.load_model("large-v2", device,compute_type=COMPUTE_TYPE)
|
16 |
|
17 |
@spaces.GPU
|
18 |
def transcribe(inputs, task):
|