wtlow003
commited on
Commit
ยท
541a052
1
Parent(s):
793215b
fix: missing text
Browse files
app.py
CHANGED
@@ -27,7 +27,7 @@ def transcribe(inputs, task):
|
|
27 |
|
28 |
text = pipe(
|
29 |
inputs,
|
30 |
-
generate_kwargs={"
|
31 |
return_timestamps=True,
|
32 |
)["chunks"]
|
33 |
return text
|
@@ -39,17 +39,12 @@ mf_transcribe = gr.Interface(
|
|
39 |
fn=transcribe,
|
40 |
inputs=[
|
41 |
gr.inputs.Audio(source="microphone", type="filepath", optional=True),
|
42 |
-
gr.inputs.Radio(["transcribe"], label="Task", default="transcribe"),
|
43 |
],
|
44 |
outputs="text",
|
45 |
layout="horizontal",
|
46 |
theme="huggingface",
|
47 |
title="Whisper Small: Singlish Edition ๐ธ๐ฌ",
|
48 |
-
description=(
|
49 |
-
"Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the OpenAI Whisper"
|
50 |
-
f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and ๐ค Transformers to transcribe audio files"
|
51 |
-
" of arbitrary length."
|
52 |
-
),
|
53 |
allow_flagging="never",
|
54 |
)
|
55 |
|
@@ -59,17 +54,12 @@ file_transcribe = gr.Interface(
|
|
59 |
gr.inputs.Audio(
|
60 |
source="upload", type="filepath", optional=True, label="Audio file"
|
61 |
),
|
62 |
-
gr.inputs.Radio(["transcribe"], label="Task", default="transcribe"),
|
63 |
],
|
64 |
outputs="text",
|
65 |
layout="horizontal",
|
66 |
theme="huggingface",
|
67 |
title="Whisper Small: Singlish Edition ๐ธ๐ฌ",
|
68 |
-
description=(
|
69 |
-
"Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the OpenAI Whisper"
|
70 |
-
f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and ๐ค Transformers to transcribe audio files"
|
71 |
-
" of arbitrary length."
|
72 |
-
),
|
73 |
allow_flagging="never",
|
74 |
)
|
75 |
|
|
|
27 |
|
28 |
text = pipe(
|
29 |
inputs,
|
30 |
+
generate_kwargs={"language": "english"},
|
31 |
return_timestamps=True,
|
32 |
)["chunks"]
|
33 |
return text
|
|
|
39 |
fn=transcribe,
|
40 |
inputs=[
|
41 |
gr.inputs.Audio(source="microphone", type="filepath", optional=True),
|
|
|
42 |
],
|
43 |
outputs="text",
|
44 |
layout="horizontal",
|
45 |
theme="huggingface",
|
46 |
title="Whisper Small: Singlish Edition ๐ธ๐ฌ",
|
47 |
+
description=(""),
|
|
|
|
|
|
|
|
|
48 |
allow_flagging="never",
|
49 |
)
|
50 |
|
|
|
54 |
gr.inputs.Audio(
|
55 |
source="upload", type="filepath", optional=True, label="Audio file"
|
56 |
),
|
|
|
57 |
],
|
58 |
outputs="text",
|
59 |
layout="horizontal",
|
60 |
theme="huggingface",
|
61 |
title="Whisper Small: Singlish Edition ๐ธ๐ฌ",
|
62 |
+
description=(""),
|
|
|
|
|
|
|
|
|
63 |
allow_flagging="never",
|
64 |
)
|
65 |
|