Pijush2023 commited on
Commit
4387c4b
·
verified ·
1 Parent(s): e6b27f2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -618,7 +618,7 @@ with gr.Blocks(theme='rawrsor1/Everforest') as demo:
618
 
619
  chat_input = gr.Textbox(show_copy_button=True, interactive=True, show_label=False, label="Transcription")
620
  chat_msg = chat_input.submit(add_message, [chatbot, chat_input], [chatbot, chat_input])
621
- bot_msg = chat_msg.then(bot, [chatbot, choice], [chatbot, gr.Audio()])
622
  bot_msg.then(lambda: gr.Textbox(value="", interactive=True, placeholder="Enter message or upload file...", show_label=False), None, [chat_input])
623
  chatbot.like(print_like_dislike, None, None)
624
  clear_button = gr.Button("Clear")
@@ -636,9 +636,8 @@ with gr.Blocks(theme='rawrsor1/Everforest') as demo:
636
  location_output = gr.HTML()
637
  bot_msg.then(show_map_if_details, [chatbot, choice], [location_output, location_output])
638
  with gr.Column():
639
- gr.Markdown("<h1>Listen the audio</h1>", elem_id="audio-markdown")
640
  audio_output = gr.Audio()
641
- #bot_msg.then(generate_audio_elevenlabs, chatbot, audio_output)
642
  bot_msg_audio = bot_msg.then(lambda history: generate_audio_elevenlabs(history[-1][1]), chatbot, audio_output)
643
  with gr.Row():
644
 
 
618
 
619
  chat_input = gr.Textbox(show_copy_button=True, interactive=True, show_label=False, label="Transcription")
620
  chat_msg = chat_input.submit(add_message, [chatbot, chat_input], [chatbot, chat_input])
621
+ bot_msg = chat_msg.then(bot, [chatbot, choice], [chatbot, gr.Audio(interactive=False, autoplay=True)])
622
  bot_msg.then(lambda: gr.Textbox(value="", interactive=True, placeholder="Enter message or upload file...", show_label=False), None, [chat_input])
623
  chatbot.like(print_like_dislike, None, None)
624
  clear_button = gr.Button("Clear")
 
636
  location_output = gr.HTML()
637
  bot_msg.then(show_map_if_details, [chatbot, choice], [location_output, location_output])
638
  with gr.Column():
639
+ gr.Markdown("<h1>Listen to the audio</h1>", elem_id="audio-markdown")
640
  audio_output = gr.Audio()
 
641
  bot_msg_audio = bot_msg.then(lambda history: generate_audio_elevenlabs(history[-1][1]), chatbot, audio_output)
642
  with gr.Row():
643