Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -168,7 +168,7 @@ def generate_zip(metadata_state, audio_path, zip_name):
|
|
168 |
with gr.Blocks() as demo:
|
169 |
gr.Markdown("# Application de Découpe Audio")
|
170 |
metadata_state = gr.State(init_metadata_state())
|
171 |
-
zip_name = gr.Audio(type="filepath", label="Fichier audio")
|
172 |
zip_name = gr.Textbox(label="Nom du fichier ZIP", interactive=True)
|
173 |
raw_transcription = gr.Textbox(label="Transcription", interactive=True)
|
174 |
transcription_timestamps = gr.Textbox(label="Transcription avec Timestamps", interactive=True)
|
@@ -177,8 +177,8 @@ with gr.Blocks() as demo:
|
|
177 |
generate_button = gr.Button("Générer ZIP")
|
178 |
zip_file = gr.File(label="Télécharger le ZIP")
|
179 |
|
180 |
-
audio_input.change(transcribe_audio, inputs=
|
181 |
-
save_button.click(save_segments, inputs=
|
182 |
-
generate_button.click(generate_zip, inputs=[metadata_state, zip_name], outputs=zip_file)
|
183 |
|
184 |
demo.queue().launch()
|
|
|
168 |
with gr.Blocks() as demo:
|
169 |
gr.Markdown("# Application de Découpe Audio")
|
170 |
metadata_state = gr.State(init_metadata_state())
|
171 |
+
zip_name = gr.audio_input = gr.Audio(type="filepath", label="Fichier audio")
|
172 |
zip_name = gr.Textbox(label="Nom du fichier ZIP", interactive=True)
|
173 |
raw_transcription = gr.Textbox(label="Transcription", interactive=True)
|
174 |
transcription_timestamps = gr.Textbox(label="Transcription avec Timestamps", interactive=True)
|
|
|
177 |
generate_button = gr.Button("Générer ZIP")
|
178 |
zip_file = gr.File(label="Télécharger le ZIP")
|
179 |
|
180 |
+
audio_input.change(transcribe_audio, inputs=audio_input, outputs=[raw_transcription, word_timestamps, transcription_timestamps, audio_input, zip_name])
|
181 |
+
save_button.click(save_segments, inputs=table, outputs=[metadata_state, zip_name])
|
182 |
+
generate_button.click(generate_zip, inputs=[metadata_state, audio_input, zip_name], outputs=zip_file)
|
183 |
|
184 |
demo.queue().launch()
|