xujinheng666 commited on
Commit
864fbcc
·
verified ·
1 Parent(s): 8cd3096

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -7,8 +7,7 @@ from difflib import SequenceMatcher
7
  from transformers import pipeline
8
 
9
  # Device setup
10
- device = "cuda"
11
- # if torch.cuda.is_available() else "cpu"
12
 
13
  # Load Whisper model for transcription
14
  MODEL_NAME = "alvanlii/whisper-small-cantonese"
 
7
  from transformers import pipeline
8
 
9
  # Device setup
10
+ device = "cuda" if torch.cuda.is_available() else "cpu"
 
11
 
12
  # Load Whisper model for transcription
13
  MODEL_NAME = "alvanlii/whisper-small-cantonese"