Spaces:
Sleeping
Sleeping
DeepLearning101
commited on
Commit
•
567ec12
1
Parent(s):
7d047c4
Update app.py
Browse files
app.py
CHANGED
@@ -77,56 +77,22 @@ def yt_transcribe(yt_url, task, max_filesize=75.0):
|
|
77 |
|
78 |
return html_embed_str, text
|
79 |
|
80 |
-
mf_transcribe = gr.Interface(
|
81 |
-
fn=transcribe,
|
82 |
-
inputs=[
|
83 |
-
gr.Audio(type="filepath"),
|
84 |
-
gr.Radio(["transcribe", "translate"], label="Task", value="transcribe"),
|
85 |
-
],
|
86 |
-
outputs="text",
|
87 |
-
title="Whisper Large V3: Transcribe Audio",
|
88 |
-
description=(
|
89 |
-
"Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the"
|
90 |
-
f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers to transcribe audio files"
|
91 |
-
" of arbitrary length."
|
92 |
-
|
93 |
-
"[TonTon Huang Ph.D. @ 2024/04](https://www.twman.org)"
|
94 |
-
|
95 |
-
"[那些語音處理 (Speech Processing) 踩的坑](https://blog.twman.org/2021/04/ASR.html) | [那些自然語言處理 (Natural Language Processing, NLP) 踩的坑](https://blog.twman.org/2021/04/NLP.html)"
|
96 |
-
|
97 |
-
"[那些ASR和TTS可能會踩的坑](https://blog.twman.org/2024/02/asr-tts.html) | [那些大模型開發會踩的坑](https://blog.twman.org/2024/02/LLM.html)"
|
98 |
-
|
99 |
-
"[什麼是大語言模型,它是什麼?想要嗎?](https://blog.twman.org/2023/04/GPT.html)"
|
100 |
-
|
101 |
-
"[用PaddleOCR的PPOCRLabel來微調醫療診斷書和收據](https://blog.twman.org/2023/07/wsl.html) | [基於機器閱讀理解和指令微調的統一信息抽取框架之診斷書醫囑資訊擷取分析](https://blog.twman.org/2023/07/HugIE.html)"
|
102 |
-
|
103 |
-
),
|
104 |
-
allow_flagging="never",
|
105 |
-
)
|
106 |
-
|
107 |
file_transcribe = gr.Interface(
|
108 |
fn=transcribe,
|
109 |
inputs=[
|
110 |
-
gr.Audio(type="filepath"
|
111 |
gr.Radio(["transcribe", "translate"], label="Task", value="transcribe"),
|
112 |
],
|
113 |
outputs="text",
|
114 |
title="Whisper Large V3: Transcribe Audio",
|
115 |
-
description=
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
"[那些ASR和TTS可能會踩的坑](https://blog.twman.org/2024/02/asr-tts.html) | [那些大模型開發會踩的坑](https://blog.twman.org/2024/02/LLM.html)"
|
125 |
-
|
126 |
-
"[什麼是大語言模型,它是什麼?想要嗎?](https://blog.twman.org/2023/04/GPT.html)"
|
127 |
-
|
128 |
-
"[用PaddleOCR的PPOCRLabel來微調醫療診斷書和收據](https://blog.twman.org/2023/07/wsl.html) | [基於機器閱讀理解和指令微調的統一信息抽取框架之診斷書醫囑資訊擷取分析](https://blog.twman.org/2023/07/HugIE.html)"
|
129 |
-
|
130 |
),
|
131 |
allow_flagging="never",
|
132 |
)
|
@@ -139,26 +105,19 @@ yt_transcribe = gr.Interface(
|
|
139 |
],
|
140 |
outputs=["html", "text"],
|
141 |
title="Whisper Large V3: Transcribe YouTube",
|
142 |
-
description=
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
"[那些ASR和TTS可能會踩的坑](https://blog.twman.org/2024/02/asr-tts.html) | [那些大模型開發會踩的坑](https://blog.twman.org/2024/02/LLM.html)"
|
152 |
-
|
153 |
-
"[什麼是大語言模型,它是什麼?想要嗎?](https://blog.twman.org/2023/04/GPT.html)"
|
154 |
-
|
155 |
-
"[用PaddleOCR的PPOCRLabel來微調醫療診斷書和收據](https://blog.twman.org/2023/07/wsl.html) | [基於機器閱讀理解和指令微調的統一信息抽取框架之診斷書醫囑資訊擷取分析](https://blog.twman.org/2023/07/HugIE.html)"
|
156 |
-
|
157 |
),
|
158 |
allow_flagging="never",
|
159 |
)
|
160 |
|
161 |
with gr.Blocks() as demo:
|
162 |
-
gr.TabbedInterface([
|
163 |
|
164 |
demo.launch(debug=True)
|
|
|
77 |
|
78 |
return html_embed_str, text
|
79 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
file_transcribe = gr.Interface(
|
81 |
fn=transcribe,
|
82 |
inputs=[
|
83 |
+
gr.Audio(type="filepath"),
|
84 |
gr.Radio(["transcribe", "translate"], label="Task", value="transcribe"),
|
85 |
],
|
86 |
outputs="text",
|
87 |
title="Whisper Large V3: Transcribe Audio",
|
88 |
+
description="""Transcribe long-form microphone or audio inputs with the click of a button! Demo uses the checkpoint openai/whisper-large-v3 and 🤗 Transformers to transcribe audio files of arbitrary length.<br>
|
89 |
+
<a href='https://www.twman.org' target='_blank'>TonTon Huang Ph.D. @ 2024/04 </a><br>
|
90 |
+
輸入ASR文本,糾正同音字/詞錯誤<br>
|
91 |
+
<a href='https://blog.twman.org/2021/04/ASR.html' target='_blank'>那些語音處理 (Speech Processing) 踩的坑</a> | <a href='https://blog.twman.org/2021/04/NLP.html' target='_blank'>那些自然語言處理 (Natural Language Processing, NLP) 踩的坑</a><br>
|
92 |
+
<a href='https://blog.twman.org/2024/02/asr-tts.html' target='_blank'>那些ASR和TTS可能會踩的坑</a> | <a href='https://blog.twman.org/2024/02/LLM.html' target='_blank'>那些大模型開發會踩的坑</a><br>
|
93 |
+
<a href='https://blog.twman.org/2023/04/GPT.html' target='_blank'>什麼是大語言模型,它是什麼?想要嗎?</a><br>
|
94 |
+
<a href='https://blog.twman.org/2023/07/wsl.html' target='_blank'>用PaddleOCR的PPOCRLabel來微調醫療診斷書和收據</a> | <a href='https://blog.twman.org/2023/07/HugIE.html' target='_blank'>基於機器閱讀理解和指令微調的統一信息抽取框架之診斷書醫囑資訊擷取分析</a><br>
|
95 |
+
<a href='https://github.com/shibing624/pycorrector' target='_blank'>Masked Language Model (MLM) as correction BERT</a>""",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
),
|
97 |
allow_flagging="never",
|
98 |
)
|
|
|
105 |
],
|
106 |
outputs=["html", "text"],
|
107 |
title="Whisper Large V3: Transcribe YouTube",
|
108 |
+
description="""Transcribe long-form YouTube videos with the click of a button! Demo uses the checkpoint openai/whisper-large-v3 and 🤗 Transformers to transcribe audio files of arbitrary length.<br>
|
109 |
+
<a href='https://www.twman.org' target='_blank'>TonTon Huang Ph.D. @ 2024/04 </a><br>
|
110 |
+
輸入ASR文本,糾正同音字/詞錯誤<br>
|
111 |
+
<a href='https://blog.twman.org/2021/04/ASR.html' target='_blank'>那些語音處理 (Speech Processing) 踩的坑</a> | <a href='https://blog.twman.org/2021/04/NLP.html' target='_blank'>那些自然語言處理 (Natural Language Processing, NLP) 踩的坑</a><br>
|
112 |
+
<a href='https://blog.twman.org/2024/02/asr-tts.html' target='_blank'>那些ASR和TTS可能會踩的坑</a> | <a href='https://blog.twman.org/2024/02/LLM.html' target='_blank'>那些大模型開發會踩的坑</a><br>
|
113 |
+
<a href='https://blog.twman.org/2023/04/GPT.html' target='_blank'>什麼是大語言模型,它是什麼?想要嗎?</a><br>
|
114 |
+
<a href='https://blog.twman.org/2023/07/wsl.html' target='_blank'>用PaddleOCR的PPOCRLabel來微調醫療診斷書和收據</a> | <a href='https://blog.twman.org/2023/07/HugIE.html' target='_blank'>基於機器閱讀理解和指令微調的統一信息抽取框架之診斷書醫囑資訊擷取分析</a><br>
|
115 |
+
<a href='https://github.com/shibing624/pycorrector' target='_blank'>Masked Language Model (MLM) as correction BERT</a>""",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
116 |
),
|
117 |
allow_flagging="never",
|
118 |
)
|
119 |
|
120 |
with gr.Blocks() as demo:
|
121 |
+
gr.TabbedInterface([file_transcribe, yt_transcribe], ["Audio file", "YouTube"])
|
122 |
|
123 |
demo.launch(debug=True)
|