rohitp1 commited on
Commit
a3d358b
·
1 Parent(s): e0127cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -18,9 +18,9 @@ import torch
18
  auth_token = os.environ.get('TOKEN')
19
 
20
 
21
- M1 = "rohitp1/kkkh_whisper_small_distillation_att_loss_libri360_epochs_100_batch_4_concat_dataset"
22
- M2 = "rohitp1/dgx2_whisper_small_finetune_teacher_babble_noise_libri_360_hours_50_epochs_batch_8"
23
- M3 = "rohitp1/subhadeep_whisper_small_finetune_teacher_no_noise_libri_360_hours_100_epochs_batch_8"
24
 
25
  model1 = WhisperForConditionalGeneration.from_pretrained(M1, use_auth_token=auth_token)
26
  tokenizer1 = WhisperTokenizer.from_pretrained(M1, use_auth_token=auth_token)
@@ -57,7 +57,7 @@ def transcribe(mic_input, upl_input, model_type):
57
  text = p2(audio)["text"]
58
  elif model_type == 'CleanFinetuned':
59
  text = p3(audio)["text"]
60
- elif model_type == 'NoisyDistillationQuantised':
61
  text = p1_quant(audio)['text']
62
  else:
63
  text = p1(audio)["text"]
@@ -115,7 +115,7 @@ if __name__ == "__main__":
115
  )
116
 
117
  with gr.Row():
118
- model_type = gr.inputs.Dropdown(["RobustDistillation", "NoisyFinetuned", "CleanFinetuned", "NoisyDistillationQuantised"], label='Model Type')
119
 
120
  with gr.Row():
121
  clr_btn = gr.Button(value="Clear", variant="secondary")
@@ -152,7 +152,7 @@ if __name__ == "__main__":
152
  """
153
  <h4>Credits</h4>
154
  Author: Rohit Prasad <br>
155
- Check out the model <a href="https://huggingface.co/rohitp1/kkkh_whisper_small_distillation_att_loss_libri360_epochs_100_batch_4_concat_dataset">here</a>
156
  """
157
  )
158
 
 
18
  auth_token = os.environ.get('TOKEN')
19
 
20
 
21
+ M1 = "rohitp1/subh_whisper_small_distil_att_loss_mozilla_epochs_50_batch_8"
22
+ M2 = "rohitp1/dgx1_whisper_small_finetune_teacher_babble_noise_mozilla_40_epochs_batch_8"
23
+ M3 = "openai/whisper-small.en"
24
 
25
  model1 = WhisperForConditionalGeneration.from_pretrained(M1, use_auth_token=auth_token)
26
  tokenizer1 = WhisperTokenizer.from_pretrained(M1, use_auth_token=auth_token)
 
57
  text = p2(audio)["text"]
58
  elif model_type == 'CleanFinetuned':
59
  text = p3(audio)["text"]
60
+ elif model_type == 'DistilledQuantised':
61
  text = p1_quant(audio)['text']
62
  else:
63
  text = p1(audio)["text"]
 
115
  )
116
 
117
  with gr.Row():
118
+ model_type = gr.inputs.Dropdown(["RobustDistillation", "NoisyFinetuned", "CleanFinetuned", "DistilledAndQuantised"], label='Model Type')
119
 
120
  with gr.Row():
121
  clr_btn = gr.Button(value="Clear", variant="secondary")
 
152
  """
153
  <h4>Credits</h4>
154
  Author: Rohit Prasad <br>
155
+ Check out the model <a href="https://huggingface.co/rohitp1/subh_whisper_small_distil_att_loss_mozilla_epochs_50_batch_8">here</a>
156
  """
157
  )
158