Spaces:
Running on Zero
Running on Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,5 +1,5 @@
|
|
| 1 |
import os
|
| 2 |
-
|
| 3 |
|
| 4 |
REPO_TYPE = "hf"
|
| 5 |
if REPO_TYPE not in ["hf", "ms"]:
|
|
@@ -409,6 +409,7 @@ def get_model_options(pipeline_type):
|
|
| 409 |
# Dictionary to store loaded models
|
| 410 |
loaded_models = {}
|
| 411 |
|
|
|
|
| 412 |
def transcribe_audio(audio_input, audio_url, proxy_url, proxy_username, proxy_password, pipeline_type, model_id, download_method, start_time=None, end_time=None, verbose=False):
|
| 413 |
"""
|
| 414 |
Transcribes audio from a given source using SenseVoice.
|
|
|
|
| 1 |
import os
|
| 2 |
+
import spaces
|
| 3 |
|
| 4 |
REPO_TYPE = "hf"
|
| 5 |
if REPO_TYPE not in ["hf", "ms"]:
|
|
|
|
| 409 |
# Dictionary to store loaded models
|
| 410 |
loaded_models = {}
|
| 411 |
|
| 412 |
+
@spaces.GPU(duration=120)
|
| 413 |
def transcribe_audio(audio_input, audio_url, proxy_url, proxy_username, proxy_password, pipeline_type, model_id, download_method, start_time=None, end_time=None, verbose=False):
|
| 414 |
"""
|
| 415 |
Transcribes audio from a given source using SenseVoice.
|