BounharAbdelaziz commited on
Commit
1e9de44
·
verified ·
1 Parent(s): 1e4f628

v0.1: removed save to eval dataset for now

Browse files
Files changed (1) hide show
  1. utils.py +12 -2
utils.py CHANGED
@@ -15,10 +15,15 @@ from datasets import (
15
  Audio,
16
  )
17
 
 
 
18
 
19
  # Hugging Face evaluation dataset
20
  HF_DATASET_NAME = "BounharAbdelaziz/Moroccan-STT-Eval-Dataset"
21
 
 
 
 
22
  # Models paths
23
  MODEL_PATHS = {
24
  "NANO": "BounharAbdelaziz/Morocco-Darija-STT-tiny",
@@ -26,6 +31,9 @@ MODEL_PATHS = {
26
  "LARGE": "BounharAbdelaziz/Morocco-Darija-STT-large-v1.2",
27
  }
28
 
 
 
 
29
  # Access token to models
30
  STT_MODEL_TOKEN = os.environ.get("STT_MODEL_TOKEN")
31
 
@@ -56,7 +64,6 @@ def create_html_image(image_path):
56
  """
57
  return html_string
58
 
59
-
60
  # ---------------------------------------------------------------------------- #
61
  # ---------------------------------------------------------------------------- #
62
 
@@ -105,6 +112,9 @@ def load_model(model_name):
105
  # ---------------------------------------------------------------------------- #
106
 
107
  def process_audio(audio, model_choice, save_data):
 
 
 
108
  pipe = load_model(model_choice)
109
  audio_signal = audio[1]
110
  sample_rate = audio[0]
@@ -161,7 +171,7 @@ def create_interface():
161
  with gr.Row():
162
  save_data = gr.Checkbox(
163
  label="Contribute to the evaluation benchmark",
164
- value=True
165
  )
166
 
167
  submit_btn = gr.Button("Transcribe 🔥")
 
15
  Audio,
16
  )
17
 
18
+ # ---------------------------------------------------------------------------- #
19
+ # ---------------------------------------------------------------------------- #
20
 
21
  # Hugging Face evaluation dataset
22
  HF_DATASET_NAME = "BounharAbdelaziz/Moroccan-STT-Eval-Dataset"
23
 
24
+ # ---------------------------------------------------------------------------- #
25
+ # ---------------------------------------------------------------------------- #
26
+
27
  # Models paths
28
  MODEL_PATHS = {
29
  "NANO": "BounharAbdelaziz/Morocco-Darija-STT-tiny",
 
31
  "LARGE": "BounharAbdelaziz/Morocco-Darija-STT-large-v1.2",
32
  }
33
 
34
+ # ---------------------------------------------------------------------------- #
35
+ # ---------------------------------------------------------------------------- #
36
+
37
  # Access token to models
38
  STT_MODEL_TOKEN = os.environ.get("STT_MODEL_TOKEN")
39
 
 
64
  """
65
  return html_string
66
 
 
67
  # ---------------------------------------------------------------------------- #
68
  # ---------------------------------------------------------------------------- #
69
 
 
112
  # ---------------------------------------------------------------------------- #
113
 
114
  def process_audio(audio, model_choice, save_data):
115
+
116
+ # Force to false for now, issue with dataset
117
+ save_data = False
118
  pipe = load_model(model_choice)
119
  audio_signal = audio[1]
120
  sample_rate = audio[0]
 
171
  with gr.Row():
172
  save_data = gr.Checkbox(
173
  label="Contribute to the evaluation benchmark",
174
+ value=False,
175
  )
176
 
177
  submit_btn = gr.Button("Transcribe 🔥")