Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -360,7 +360,7 @@ def process_url(input_path, num_speakers=2, whisper_model="small.en", offset=0,
|
|
360 |
|
361 |
try:
|
362 |
results = main(input_path, api_name=api_name, api_key=api_key, num_speakers=num_speakers, whisper_model=whisper_model, offset=offset, vad_filter=vad_filter, download_video_flag=download_video_flag)
|
363 |
-
|
364 |
if results:
|
365 |
transcription_result = results[0]
|
366 |
json_file_path = transcription_result['audio_file'].replace('.wav', '.segments.json')
|
@@ -1281,7 +1281,10 @@ def launch_ui(demo_mode=False):
|
|
1281 |
|
1282 |
iface = gr.Interface(
|
1283 |
# fn=lambda url, num_speakers, whisper_model, offset, api_name, api_key: process_url(url, num_speakers, whisper_model, offset, api_name=api_name, api_key=api_key, demo_mode=demo_mode),
|
1284 |
-
|
|
|
|
|
|
|
1285 |
inputs=inputs,
|
1286 |
outputs=[
|
1287 |
gr.components.Textbox(label="Transcription", value=lambda: "", max_lines=10),
|
|
|
360 |
|
361 |
try:
|
362 |
results = main(input_path, api_name=api_name, api_key=api_key, num_speakers=num_speakers, whisper_model=whisper_model, offset=offset, vad_filter=vad_filter, download_video_flag=download_video_flag)
|
363 |
+
|
364 |
if results:
|
365 |
transcription_result = results[0]
|
366 |
json_file_path = transcription_result['audio_file'].replace('.wav', '.segments.json')
|
|
|
1281 |
|
1282 |
iface = gr.Interface(
|
1283 |
# fn=lambda url, num_speakers, whisper_model, offset, api_name, api_key: process_url(url, num_speakers, whisper_model, offset, api_name=api_name, api_key=api_key, demo_mode=demo_mode),
|
1284 |
+
|
1285 |
+
fn=lambda url, num_speakers, whisper_model, offset, api_name, api_key: process_url(url, num_speakers, whisper_model, offset, api_name, api_key, demo_mode=demo_mode),
|
1286 |
+
|
1287 |
+
# fn=lambda *args: process_url(*args, demo_mode=demo_mode),
|
1288 |
inputs=inputs,
|
1289 |
outputs=[
|
1290 |
gr.components.Textbox(label="Transcription", value=lambda: "", max_lines=10),
|