Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -11,7 +11,7 @@ peft_model_id = "Boadiwaa/LORA-colab-Whisper-medium"
|
|
11 |
task = "transcribe"
|
12 |
peft_config = PeftConfig.from_pretrained(peft_model_id)
|
13 |
model = WhisperForConditionalGeneration.from_pretrained(
|
14 |
-
peft_config.base_model_name_or_path,
|
15 |
)
|
16 |
|
17 |
model = PeftModel.from_pretrained(model, peft_model_id)
|
@@ -31,8 +31,8 @@ demo = gr.Interface(
|
|
31 |
fn=transcribe,
|
32 |
inputs=gr.Audio(sources=["microphone"], type="filepath"),
|
33 |
outputs="text",
|
34 |
-
title="
|
35 |
-
description="Realtime demo for Ghanaian-accented speech recognition
|
36 |
)
|
37 |
|
38 |
demo.launch(share=True)
|
|
|
11 |
task = "transcribe"
|
12 |
peft_config = PeftConfig.from_pretrained(peft_model_id)
|
13 |
model = WhisperForConditionalGeneration.from_pretrained(
|
14 |
+
peft_config.base_model_name_or_path,device_map="auto"
|
15 |
)
|
16 |
|
17 |
model = PeftModel.from_pretrained(model, peft_model_id)
|
|
|
31 |
fn=transcribe,
|
32 |
inputs=gr.Audio(sources=["microphone"], type="filepath"),
|
33 |
outputs="text",
|
34 |
+
title="Transcriber for Ghanaian-accented speech (English)",
|
35 |
+
description="Realtime demo for Ghanaian-accented speech recognition (in English).",
|
36 |
)
|
37 |
|
38 |
demo.launch(share=True)
|