Manjot Singh commited on
Commit
0b09d28
·
1 Parent(s): e14e19e

reverted device to cuda

Browse files
Files changed (3) hide show
  1. app.py +1 -1
  2. audio_processing.py +1 -1
  3. requirements.txt +3 -0
app.py CHANGED
@@ -39,4 +39,4 @@ iface = gr.Interface(
39
  title="WhisperX Audio Transcription and Translation"
40
  )
41
 
42
- iface.launch(share=True)
 
39
  title="WhisperX Audio Transcription and Translation"
40
  )
41
 
42
+ iface.launch()
audio_processing.py CHANGED
@@ -35,7 +35,7 @@ def process_audio(audio_file, translate=False, model_size="small"):
35
  start_time = time.time()
36
 
37
  try:
38
- device = 0 if torch.cuda.is_available() else "cpu"
39
  print(f"Using device: {device}")
40
  compute_type = "float16"
41
  audio = whisperx.load_audio(audio_file)
 
35
  start_time = time.time()
36
 
37
  try:
38
+ device = "cuda" if torch.cuda.is_available() else "cpu"
39
  print(f"Using device: {device}")
40
  compute_type = "float16"
41
  audio = whisperx.load_audio(audio_file)
requirements.txt CHANGED
@@ -14,6 +14,9 @@ faster-whisper==1.0.0
14
  setuptools>=65
15
  nltk
16
  python-dotenv
 
 
 
17
  cdifflib
18
  pydub
19
  cuda-python
 
14
  setuptools>=65
15
  nltk
16
  python-dotenv
17
+ ctranslate2
18
+ pytorch
19
+ torchvision
20
  cdifflib
21
  pydub
22
  cuda-python