Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -18,9 +18,9 @@ import torch
|
|
18 |
auth_token = os.environ.get('TOKEN')
|
19 |
|
20 |
|
21 |
-
M1 = "rohitp1/
|
22 |
-
M2 = "rohitp1/
|
23 |
-
M3 = "
|
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 == '
|
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", "
|
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/
|
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 |
|