unknown user commited on
Commit
5282b42
1 Parent(s): 56a920f
Files changed (1) hide show
  1. app.py +3 -5
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", "float32")
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
- description_string = "Transcripci贸 autom脿tica de micr貌fon o de fitxers d'脿udio.\n Aquest demostrador s'ha desenvolupat per"\
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(description_string)
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")