Spaces:
Sleeping
Sleeping
Manjot Singh
commited on
Commit
·
2aa5028
1
Parent(s):
cc654dc
added conditions for cuda
Browse files
app.py
CHANGED
@@ -3,7 +3,10 @@ from audio_processing import process_audio, print_results
|
|
3 |
import torch
|
4 |
|
5 |
print(f"CUDA available: {torch.cuda.is_available()}")
|
6 |
-
|
|
|
|
|
|
|
7 |
|
8 |
def transcribe_audio(audio_file, translate, model_size):
|
9 |
language_segments, final_segments = process_audio(audio_file, translate=translate, model_size=model_size)
|
|
|
3 |
import torch
|
4 |
|
5 |
print(f"CUDA available: {torch.cuda.is_available()}")
|
6 |
+
if torch.cuda.is_available():
|
7 |
+
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
8 |
+
else:
|
9 |
+
print("No CUDA GPUs available. Running on CPU.")
|
10 |
|
11 |
def transcribe_audio(audio_file, translate, model_size):
|
12 |
language_segments, final_segments = process_audio(audio_file, translate=translate, model_size=model_size)
|