Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,7 +12,7 @@ def init_model():
|
|
12 |
ref="homebrewltd/ichigo-whisper:merge-medium-vi-2d-2560c-dim64.pth",
|
13 |
size="merge-medium-vi-2d-2560c-dim64",
|
14 |
)
|
15 |
-
device = "
|
16 |
ichigo_model.ensure_whisper(device)
|
17 |
ichigo_model.to(device)
|
18 |
return ichigo_model, device
|
|
|
12 |
ref="homebrewltd/ichigo-whisper:merge-medium-vi-2d-2560c-dim64.pth",
|
13 |
size="merge-medium-vi-2d-2560c-dim64",
|
14 |
)
|
15 |
+
device = "cpu" if torch.cuda.is_available() else "cuda"
|
16 |
ichigo_model.ensure_whisper(device)
|
17 |
ichigo_model.to(device)
|
18 |
return ichigo_model, device
|