Update app.py
Browse files
app.py
CHANGED
@@ -32,16 +32,16 @@ with gr.Blocks() as demo:
|
|
32 |
state = gr.State([])
|
33 |
|
34 |
with gr.Row():
|
35 |
-
audio_input = gr.Audio(type="filepath", label="Sprachaufnahme")
|
36 |
text_input = gr.Textbox(placeholder="Nachricht eingeben...")
|
37 |
|
38 |
send_button = gr.Button("Senden (Text)")
|
39 |
clear_button = gr.Button("Chat löschen")
|
40 |
|
41 |
send_button.click(chat, [text_input, state], [state, chatbot])
|
42 |
-
|
43 |
clear_button.click(lambda: [], outputs=[chatbot])
|
44 |
-
text_input.submit(chat, [text_input, state], [state, chatbot])
|
45 |
|
46 |
if __name__ == "__main__":
|
47 |
demo.launch()
|
|
|
32 |
state = gr.State([])
|
33 |
|
34 |
with gr.Row():
|
35 |
+
audio_input = gr.Audio(type="filepath", source="microphone", label="Sprachaufnahme")
|
36 |
text_input = gr.Textbox(placeholder="Nachricht eingeben...")
|
37 |
|
38 |
send_button = gr.Button("Senden (Text)")
|
39 |
clear_button = gr.Button("Chat löschen")
|
40 |
|
41 |
send_button.click(chat, [text_input, state], [state, chatbot])
|
42 |
+
#audio_input.submit(transcribe_and_send, [audio_input, state], [state, chatbot])
|
43 |
clear_button.click(lambda: [], outputs=[chatbot])
|
44 |
+
#text_input.submit(chat, [text_input, state], [state, chatbot])
|
45 |
|
46 |
if __name__ == "__main__":
|
47 |
demo.launch()
|