Spaces:
Sleeping
Sleeping
Manjot Singh
commited on
Commit
·
dbbb6ed
1
Parent(s):
d8ff412
added import spaces fix
Browse files
app.py
CHANGED
@@ -1,6 +1,7 @@
|
|
1 |
import gradio as gr
|
2 |
from audio_processing import process_audio, print_results
|
3 |
import torch
|
|
|
4 |
|
5 |
|
6 |
print(f"CUDA available: {torch.cuda.is_available()}")
|
@@ -9,6 +10,7 @@ if torch.cuda.is_available():
|
|
9 |
else:
|
10 |
print("No CUDA GPUs available. Running on CPU.")
|
11 |
|
|
|
12 |
def transcribe_audio(audio_file, translate, model_size):
|
13 |
language_segments, final_segments = process_audio(audio_file, translate=translate, model_size=model_size)
|
14 |
|
|
|
1 |
import gradio as gr
|
2 |
from audio_processing import process_audio, print_results
|
3 |
import torch
|
4 |
+
import spaces
|
5 |
|
6 |
|
7 |
print(f"CUDA available: {torch.cuda.is_available()}")
|
|
|
10 |
else:
|
11 |
print("No CUDA GPUs available. Running on CPU.")
|
12 |
|
13 |
+
@spaces.GPU
|
14 |
def transcribe_audio(audio_file, translate, model_size):
|
15 |
language_segments, final_segments = process_audio(audio_file, translate=translate, model_size=model_size)
|
16 |
|