Ver 2.7.0 maybe
This commit is contained in:
@@ -51,6 +51,11 @@ def do_transcribe(
|
||||
):
|
||||
if model_name == "":
|
||||
return "Error: モデル名を入力してください。"
|
||||
if hf_repo_id == "litagin/anime-whisper":
|
||||
logger.info(
|
||||
"Since litagin/anime-whisper does not support initial prompt, it will be ignored."
|
||||
)
|
||||
initial_prompt = ""
|
||||
|
||||
cmd = [
|
||||
"transcribe.py",
|
||||
@@ -159,34 +164,30 @@ def create_dataset_app() -> gr.Blocks:
|
||||
result1 = gr.Textbox(label="結果")
|
||||
with gr.Row():
|
||||
with gr.Column():
|
||||
use_hf_whisper = gr.Checkbox(
|
||||
label="HuggingFaceのWhisperを使う(速度が速いがVRAMを多く使う)",
|
||||
value=False,
|
||||
)
|
||||
whisper_model = gr.Dropdown(
|
||||
[
|
||||
"tiny",
|
||||
"base",
|
||||
"small",
|
||||
"medium",
|
||||
"large",
|
||||
"large-v2",
|
||||
"large-v3",
|
||||
],
|
||||
label="Whisperモデル",
|
||||
value="large-v3",
|
||||
)
|
||||
use_hf_whisper = gr.Checkbox(
|
||||
label="HuggingFaceのWhisperを使う(速度が速いがVRAMを多く使う)",
|
||||
value=False,
|
||||
visible=True,
|
||||
)
|
||||
hf_repo_id = gr.Dropdown(
|
||||
[
|
||||
"openai/whisper-large-v3-turbo",
|
||||
"openai/whisper-large-v3",
|
||||
"openai/whisper-large-v2",
|
||||
"kotoba-tech/kotoba-whisper-v1.1",
|
||||
"kotoba-tech/kotoba-whisper-v2.1",
|
||||
"litagin/anime-whisper",
|
||||
],
|
||||
label="HuggingFaceのWhisper repo_id",
|
||||
value="openai/whisper-large-v3",
|
||||
value="openai/whisper-large-v3-turbo",
|
||||
visible=False,
|
||||
)
|
||||
compute_type = gr.Dropdown(
|
||||
@@ -258,12 +259,13 @@ def create_dataset_app() -> gr.Blocks:
|
||||
)
|
||||
use_hf_whisper.change(
|
||||
lambda x: (
|
||||
gr.update(visible=not x),
|
||||
gr.update(visible=x),
|
||||
gr.update(visible=x),
|
||||
gr.update(visible=not x),
|
||||
),
|
||||
inputs=[use_hf_whisper],
|
||||
outputs=[hf_repo_id, batch_size, compute_type],
|
||||
outputs=[whisper_model, hf_repo_id, batch_size, compute_type],
|
||||
)
|
||||
|
||||
return app
|
||||
|
||||
Reference in New Issue
Block a user