Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
@@ -641,11 +641,15 @@ with gr.Blocks(theme='Pijush2023/scikit-learn-pijush') as demo:
|
|
641 |
choice = gr.Radio(label="Select Style", choices=["Details", "Conversational"], value="Conversational")
|
642 |
|
643 |
gr.Markdown("<h1 style='color: red;'>Talk to RADAR</h1>", elem_id="voice-markdown")
|
644 |
-
|
645 |
-
retriver_button.click(fn=generate_answer, inputs=[chatbot, choice], outputs=[chatbot])
|
646 |
chat_input = gr.Textbox(show_copy_button=True, interactive=True, show_label=False, label="ASK Radar !!!")
|
647 |
chat_msg = chat_input.submit(add_message, [chatbot, chat_input], [chatbot, chat_input],api_name="voice_query")
|
648 |
tts_choice = gr.Radio(label="Select TTS System", choices=["Eleven Labs", "Parler-TTS", "MARS5"], value="Eleven Labs")
|
|
|
|
|
|
|
|
|
|
|
649 |
bot_msg = chat_msg.then(bot, [chatbot, choice, tts_choice], [chatbot, gr.Audio(interactive=False, autoplay=True)])
|
650 |
bot_msg.then(lambda: gr.Textbox(value="", interactive=True, placeholder="Ask Radar!!!...", show_label=False), None, [chat_input])
|
651 |
chatbot.like(print_like_dislike, None, None)
|
|
|
641 |
choice = gr.Radio(label="Select Style", choices=["Details", "Conversational"], value="Conversational")
|
642 |
|
643 |
gr.Markdown("<h1 style='color: red;'>Talk to RADAR</h1>", elem_id="voice-markdown")
|
644 |
+
|
|
|
645 |
chat_input = gr.Textbox(show_copy_button=True, interactive=True, show_label=False, label="ASK Radar !!!")
|
646 |
chat_msg = chat_input.submit(add_message, [chatbot, chat_input], [chatbot, chat_input],api_name="voice_query")
|
647 |
tts_choice = gr.Radio(label="Select TTS System", choices=["Eleven Labs", "Parler-TTS", "MARS5"], value="Eleven Labs")
|
648 |
+
retriver_button = gr.Button("Retriver")
|
649 |
+
retriver_button.click(fn=add_message, inputs=[chat_input, chatbot], outputs=[chatbot, chat_input]).then(
|
650 |
+
fn=bot, inputs=[chatbot, choice, tts_choice], outputs=[chatbot, gr.Audio(interactive=False, autoplay=True)]
|
651 |
+
)
|
652 |
+
|
653 |
bot_msg = chat_msg.then(bot, [chatbot, choice, tts_choice], [chatbot, gr.Audio(interactive=False, autoplay=True)])
|
654 |
bot_msg.then(lambda: gr.Textbox(value="", interactive=True, placeholder="Ask Radar!!!...", show_label=False), None, [chat_input])
|
655 |
chatbot.like(print_like_dislike, None, None)
|