OthmaneLKH commited on
Commit
8cf2623
1 Parent(s): df39170

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -13
app.py CHANGED
@@ -586,24 +586,20 @@ with demo:
586
 
587
  audio_btn.click(fn=action, inputs=audio_btn, outputs=audio_btn) \
588
  .then(fn=check_btn, inputs=audio_btn) \
589
- .success(fn=say_hello_oth(), outputs=say_hello_oth())
590
 
591
  clear.click(lambda: None, None, msg, queue=False)
592
 
593
  ########################## Transcription ##########################
594
- # Row 1: Title
595
- gr.Markdown("<h1 style='text-align: center;'>Transcription d'Audio</h1>")
596
-
597
- # Row 2: Audio Upload and Transcription Box
598
  with gr.Row():
599
- with gr.Column(scale=1):
600
- audio_input = gr.Audio(label="Transcrire l'audio", type="filepath")
601
- transcribe_btn = gr.Button("Transcrire")
602
- with gr.Column(scale=1):
603
- transcription_output = gr.Textbox(label="Transcription", lines=10)
604
-
605
- #with gr.Row():
606
- # transcription_output = gr.Textbox(value = "Hello my name is Othmane Lkhalidi , I am a 22 years old data science student from Paris.",label="Transcription", lines=5)
607
 
608
  ########################## Key Gen Part ##########################
609
 
 
586
 
587
  audio_btn.click(fn=action, inputs=audio_btn, outputs=audio_btn) \
588
  .then(fn=check_btn, inputs=audio_btn) \
589
+ .success(fn=transcribe_audio_app, outputs=msg)
590
 
591
  clear.click(lambda: None, None, msg, queue=False)
592
 
593
  ########################## Transcription ##########################
 
 
 
 
594
  with gr.Row():
595
+ transcribe_btn = gr.Button("Transcrire l'audio")
596
+ transcription_output = gr.Textbox(value = "Hello my name is Othmane Lkhalidi , I am a 22 years old data science student from Paris.",label="Transcription", lines=5)
597
+
598
+ transcribe_btn.click(
599
+ fn=say_hello_oth,
600
+ inputs=[audio_output],
601
+ outputs=[msg]
602
+ )
603
 
604
  ########################## Key Gen Part ##########################
605