Update app.py
Browse files
app.py
CHANGED
@@ -80,8 +80,11 @@ def download_youtube_audio(youtube_url: str, output_dir: Optional[str] = None) -
|
|
80 |
print("Error:", response.status_code, response.text)
|
81 |
return None # Return None on failure
|
82 |
|
83 |
-
def run_asr(audio_file, youtube_url
|
84 |
temp_file = None
|
|
|
|
|
|
|
85 |
try:
|
86 |
if youtube_url:
|
87 |
# It's a YouTube URL
|
@@ -147,7 +150,7 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
147 |
)
|
148 |
|
149 |
run_button = gr.Button("π Transcribe Audio", variant="primary", interactive=False)
|
150 |
-
run_button.click(run_asr, inputs=[audio_input, youtube_input
|
151 |
|
152 |
# Update video player, clear transcription and audio input, and enable run button when YouTube URL is entered
|
153 |
youtube_input.change(
|
|
|
80 |
print("Error:", response.status_code, response.text)
|
81 |
return None # Return None on failure
|
82 |
|
83 |
+
def run_asr(audio_file, youtube_url):
|
84 |
temp_file = None
|
85 |
+
with_timestamp=False
|
86 |
+
model_choice = "local_whisper"
|
87 |
+
|
88 |
try:
|
89 |
if youtube_url:
|
90 |
# It's a YouTube URL
|
|
|
150 |
)
|
151 |
|
152 |
run_button = gr.Button("π Transcribe Audio", variant="primary", interactive=False)
|
153 |
+
run_button.click(run_asr, inputs=[audio_input, youtube_input], outputs=[result])
|
154 |
|
155 |
# Update video player, clear transcription and audio input, and enable run button when YouTube URL is entered
|
156 |
youtube_input.change(
|