Update app.py
Browse files
app.py
CHANGED
|
@@ -284,21 +284,34 @@ def transcribe_audio(input_source, pipeline_type, model_id, dtype, batch_size, d
|
|
| 284 |
|
| 285 |
def update_model_dropdown(pipeline_type):
|
| 286 |
model_choices = get_model_options(pipeline_type)
|
| 287 |
-
|
| 288 |
-
|
|
|
|
| 289 |
with gr.Blocks() as iface:
|
| 290 |
gr.Markdown("# Multi-Pipeline Transcription")
|
| 291 |
gr.Markdown("Transcribe audio using multiple pipelines and models.")
|
| 292 |
|
| 293 |
with gr.Row():
|
| 294 |
input_source = gr.Textbox(label="Audio Source (Upload, URL, or YouTube URL)")
|
| 295 |
-
pipeline_type = gr.Dropdown(
|
| 296 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 297 |
|
| 298 |
with gr.Row():
|
| 299 |
dtype = gr.Dropdown(choices=["int8", "float16", "float32"], label="Data Type", value="int8")
|
| 300 |
batch_size = gr.Slider(minimum=1, maximum=32, step=1, value=16, label="Batch Size")
|
| 301 |
-
download_method = gr.Dropdown(
|
|
|
|
|
|
|
|
|
|
|
|
|
| 302 |
|
| 303 |
with gr.Row():
|
| 304 |
start_time = gr.Number(label="Start Time (seconds)", value=0)
|
|
|
|
| 284 |
|
| 285 |
def update_model_dropdown(pipeline_type):
|
| 286 |
model_choices = get_model_options(pipeline_type)
|
| 287 |
+
logging.info(f"Model choices for {pipeline_type}: {model_choices}")
|
| 288 |
+
return gr.Dropdown.update(choices=model_choices, value=model_choices[0] if model_choices else None)
|
| 289 |
+
|
| 290 |
with gr.Blocks() as iface:
|
| 291 |
gr.Markdown("# Multi-Pipeline Transcription")
|
| 292 |
gr.Markdown("Transcribe audio using multiple pipelines and models.")
|
| 293 |
|
| 294 |
with gr.Row():
|
| 295 |
input_source = gr.Textbox(label="Audio Source (Upload, URL, or YouTube URL)")
|
| 296 |
+
pipeline_type = gr.Dropdown(
|
| 297 |
+
choices=["faster-batched", "faster-sequenced", "transformers"],
|
| 298 |
+
label="Pipeline Type",
|
| 299 |
+
value="faster-batched"
|
| 300 |
+
)
|
| 301 |
+
model_id = gr.Dropdown(
|
| 302 |
+
label="Model",
|
| 303 |
+
choices=get_model_options("faster-batched"),
|
| 304 |
+
value=get_model_options("faster-batched")[0]
|
| 305 |
+
)
|
| 306 |
|
| 307 |
with gr.Row():
|
| 308 |
dtype = gr.Dropdown(choices=["int8", "float16", "float32"], label="Data Type", value="int8")
|
| 309 |
batch_size = gr.Slider(minimum=1, maximum=32, step=1, value=16, label="Batch Size")
|
| 310 |
+
download_method = gr.Dropdown(
|
| 311 |
+
choices=["yt-dlp", "pytube", "youtube-dl", "yt-dlp-alt", "ffmpeg", "aria2", "wget"],
|
| 312 |
+
label="Download Method",
|
| 313 |
+
value="yt-dlp"
|
| 314 |
+
)
|
| 315 |
|
| 316 |
with gr.Row():
|
| 317 |
start_time = gr.Number(label="Start Time (seconds)", value=0)
|