Spaces:
Runtime error
Runtime error
Update app.py
Browse files`pipeline` accepts a device number instead of `torch.device("cuda")`
Forcing the pipeline to work on `device=0`
app.py
CHANGED
@@ -7,7 +7,7 @@ from huggingface_hub import model_info
|
|
7 |
|
8 |
MODEL_NAME = "openai/whisper-small" #this always needs to stay in line 8 :D sorry for the hackiness
|
9 |
|
10 |
-
device =
|
11 |
|
12 |
pipe = pipeline(
|
13 |
task="automatic-speech-recognition",
|
|
|
7 |
|
8 |
MODEL_NAME = "openai/whisper-small" #this always needs to stay in line 8 :D sorry for the hackiness
|
9 |
|
10 |
+
device = 0 if torch.cuda.is_available() else "cpu"
|
11 |
|
12 |
pipe = pipeline(
|
13 |
task="automatic-speech-recognition",
|