DeepLearning101 commited on
Commit
2fbf87f
1 Parent(s): c6912e7

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +21 -13
app.py CHANGED
@@ -77,6 +77,15 @@ def yt_transcribe(yt_url, task, max_filesize=75.0):
77
 
78
  return html_embed_str, text
79
 
 
 
 
 
 
 
 
 
 
80
  file_transcribe = gr.Interface(
81
  fn=transcribe,
82
  inputs=[
@@ -85,15 +94,19 @@ file_transcribe = gr.Interface(
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. </a><br>
90
- <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>
91
- <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>
92
- <a href='https://blog.twman.org/2023/04/GPT.html' target='_blank'>什麼是大語言模型,它是什麼?想要嗎?</a><br>
93
- <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>
94
  allow_flagging="never",
95
  )
96
 
 
 
 
 
 
 
 
 
 
97
  yt_transcribe = gr.Interface(
98
  fn=yt_transcribe,
99
  inputs=[
@@ -102,16 +115,11 @@ yt_transcribe = gr.Interface(
102
  ],
103
  outputs=["html", "text"],
104
  title="Whisper Large V3: Transcribe YouTube",
105
- 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>
106
- <a href='https://www.twman.org' target='_blank'>TonTon Huang Ph.D. </a><br>
107
- <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>
108
- <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>
109
- <a href='https://blog.twman.org/2023/04/GPT.html' target='_blank'>什麼是大語言模型,它是什麼?想要嗎?</a><br>
110
- <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>
111
  allow_flagging="never",
112
  )
113
 
114
  with gr.Blocks() as demo:
115
  gr.TabbedInterface([file_transcribe, yt_transcribe], ["Audio file", "YouTube"])
116
 
117
- demo.launch(debug=True)
 
77
 
78
  return html_embed_str, text
79
 
80
+ description = """
81
+ 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>
82
+ <a href='https://www.twman.org' target='_blank'>TonTon Huang Ph.D. </a><br>
83
+ <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>
84
+ <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>
85
+ <a href='https://blog.twman.org/2023/04/GPT.html' target='_blank'>什麼是大語言模型,它是什麼?想要嗎?</a><br>
86
+ <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>
87
+ """
88
+
89
  file_transcribe = gr.Interface(
90
  fn=transcribe,
91
  inputs=[
 
94
  ],
95
  outputs="text",
96
  title="Whisper Large V3: Transcribe Audio",
97
+ description=description,
 
 
 
 
 
98
  allow_flagging="never",
99
  )
100
 
101
+ yt_description = """
102
+ 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>
103
+ <a href='https://www.twman.org' target='_blank'>TonTon Huang Ph.D. </a><br>
104
+ <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>
105
+ <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>
106
+ <a href='https://blog.twman.org/2023/04/GPT.html' target='_blank'>什麼是大語言模型,它是什麼?想要嗎?</a><br>
107
+ <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>
108
+ """
109
+
110
  yt_transcribe = gr.Interface(
111
  fn=yt_transcribe,
112
  inputs=[
 
115
  ],
116
  outputs=["html", "text"],
117
  title="Whisper Large V3: Transcribe YouTube",
118
+ description=yt_description,
 
 
 
 
 
119
  allow_flagging="never",
120
  )
121
 
122
  with gr.Blocks() as demo:
123
  gr.TabbedInterface([file_transcribe, yt_transcribe], ["Audio file", "YouTube"])
124
 
125
+ demo.launch(debug=True)