Upload folder using huggingface_hub
Browse files
chat.py
CHANGED
@@ -97,7 +97,7 @@ def main():
|
|
97 |
speech.click(None, js=toggle_js)
|
98 |
msg = gr.Textbox(label="Say something.", elem_id="textbox")
|
99 |
mic = gr.Microphone(type="filepath", format="mp3", editable=False, waveform_options={"show_controls": False}, visible=False, elem_id="recorder")
|
100 |
-
player = gr.Audio(
|
101 |
msg.submit(user, [msg, mic, chatbot, thread], [msg, chatbot]).then(
|
102 |
bot, [chatbot, thread], chatbot).then(
|
103 |
speak, chatbot, player
|
|
|
97 |
speech.click(None, js=toggle_js)
|
98 |
msg = gr.Textbox(label="Say something.", elem_id="textbox")
|
99 |
mic = gr.Microphone(type="filepath", format="mp3", editable=False, waveform_options={"show_controls": False}, visible=False, elem_id="recorder")
|
100 |
+
player = gr.Audio(editable=False, waveform_options={"show_controls": False}, visible=False, elem_id="player")
|
101 |
msg.submit(user, [msg, mic, chatbot, thread], [msg, chatbot]).then(
|
102 |
bot, [chatbot, thread], chatbot).then(
|
103 |
speak, chatbot, player
|
play.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
function () {
|
2 |
|
3 |
-
const player = document.querySelector("#player
|
4 |
if (player) {
|
5 |
-
player.
|
6 |
}
|
7 |
}
|
|
|
1 |
function () {
|
2 |
|
3 |
+
const player = document.querySelector("#player button.play-pause-button");
|
4 |
if (player) {
|
5 |
+
player.click()
|
6 |
}
|
7 |
}
|