Spaces:
Sleeping
Sleeping
unknown user
commited on
Commit
路
5282b42
1
Parent(s):
56a920f
init
Browse files
app.py
CHANGED
@@ -3,7 +3,7 @@ from AinaTheme import theme
|
|
3 |
from faster_whisper import WhisperModel
|
4 |
import torch
|
5 |
|
6 |
-
device, torch_dtype = ("cuda", "float32") if torch.cuda.is_available() else ("cpu", "
|
7 |
|
8 |
MODEL_NAME = "suzii/vi-whisper-large-v3-turbo-v1-ct2"
|
9 |
print("Loading model ...")
|
@@ -31,9 +31,7 @@ def transcribe(inputs):
|
|
31 |
return text
|
32 |
|
33 |
|
34 |
-
|
35 |
-
" comprovar els models de reconeixement de parla per a m贸bils. Per ara utilitza el checkpoint "\
|
36 |
-
f"[{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) i la llibreria de 馃 Transformers per a la transcripci贸."
|
37 |
|
38 |
|
39 |
def clear():
|
@@ -41,7 +39,7 @@ def clear():
|
|
41 |
|
42 |
|
43 |
with gr.Blocks(theme=theme) as demo:
|
44 |
-
gr.Markdown(
|
45 |
with gr.Row():
|
46 |
with gr.Column(scale=1):
|
47 |
input = gr.Audio(sources=["upload", "microphone"], type="filepath", label="Audio")
|
|
|
3 |
from faster_whisper import WhisperModel
|
4 |
import torch
|
5 |
|
6 |
+
device, torch_dtype = ("cuda", "float32") if torch.cuda.is_available() else ("cpu", "int8")
|
7 |
|
8 |
MODEL_NAME = "suzii/vi-whisper-large-v3-turbo-v1-ct2"
|
9 |
print("Loading model ...")
|
|
|
31 |
return text
|
32 |
|
33 |
|
34 |
+
|
|
|
|
|
35 |
|
36 |
|
37 |
def clear():
|
|
|
39 |
|
40 |
|
41 |
with gr.Blocks(theme=theme) as demo:
|
42 |
+
gr.Markdown("CPU - type: int8")
|
43 |
with gr.Row():
|
44 |
with gr.Column(scale=1):
|
45 |
input = gr.Audio(sources=["upload", "microphone"], type="filepath", label="Audio")
|