Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -24,12 +24,12 @@ def transcribe(microphone, file_upload):
|
|
24 |
warn_output = ""
|
25 |
if (microphone is not None) and (file_upload is not None):
|
26 |
warn_output = (
|
27 |
-
"WARNING
|
28 |
-
"
|
29 |
)
|
30 |
|
31 |
elif (microphone is None) and (file_upload is None):
|
32 |
-
return "ERROR:
|
33 |
|
34 |
file = microphone if microphone is not None else file_upload
|
35 |
|
@@ -71,8 +71,8 @@ mf_transcribe = gr.Interface(
|
|
71 |
theme="huggingface",
|
72 |
title="口译示例: 音频转录",
|
73 |
description=(
|
74 |
-
"
|
75 |
-
f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗
|
76 |
" of arbitrary length."
|
77 |
),
|
78 |
article=article,
|
@@ -85,9 +85,9 @@ yt_transcribe = gr.Interface(
|
|
85 |
outputs=["html", "text"],
|
86 |
layout="horizontal",
|
87 |
theme="huggingface",
|
88 |
-
title="口译示例:
|
89 |
description=(
|
90 |
-
"
|
91 |
f" [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers to transcribe audio files of"
|
92 |
" arbitrary length."
|
93 |
),
|
|
|
24 |
warn_output = ""
|
25 |
if (microphone is not None) and (file_upload is not None):
|
26 |
warn_output = (
|
27 |
+
"WARNING:上传一个音频文件或者使用麦克风录制. "
|
28 |
+
"使用麦克风录制音频文件丢弃上传的音频文件.\n"
|
29 |
)
|
30 |
|
31 |
elif (microphone is None) and (file_upload is None):
|
32 |
+
return "ERROR: 你必须使用麦克风录制或上传音频文件"
|
33 |
|
34 |
file = microphone if microphone is not None else file_upload
|
35 |
|
|
|
71 |
theme="huggingface",
|
72 |
title="口译示例: 音频转录",
|
73 |
description=(
|
74 |
+
"转录麦克风或上传的音频文件! 演示使用微调过的模型"
|
75 |
+
f" checkpoint [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 转录音频文件"
|
76 |
" of arbitrary length."
|
77 |
),
|
78 |
article=article,
|
|
|
85 |
outputs=["html", "text"],
|
86 |
layout="horizontal",
|
87 |
theme="huggingface",
|
88 |
+
title="口译示例: 视频转录",
|
89 |
description=(
|
90 |
+
"转录上传的视频文件! 使用微调后的模型:"
|
91 |
f" [{MODEL_NAME}](https://huggingface.co/{MODEL_NAME}) and 🤗 Transformers to transcribe audio files of"
|
92 |
" arbitrary length."
|
93 |
),
|