Arafath10 commited on
Commit
2a7bef1
·
1 Parent(s): 12c0b58

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -36,9 +36,7 @@ with gr.Blocks() as demo:
36
  def respond(message, chat_history):
37
  # Basic echo response
38
  chat_history.append((message, "message"))
39
- engine.save_to_file('Hello World', 'speech.wav')
40
- engine.runAndWait()
41
- return "", chat_history,"speech.wav"
42
 
43
  def save_chat(chat_history):
44
  global current_chat_id
@@ -59,7 +57,7 @@ with gr.Blocks() as demo:
59
 
60
 
61
  enter_chat_name.change(load_chat, [enter_chat_name], outputs=[msg,chatbot])
62
- msg.submit(respond, [msg, chatbot], [msg, chatbot,audio_input])
63
  save_button.click(save_chat, [chatbot], outputs=[display_chat_names,chatbot,audio_input2]) # Added display_chat_names as an output
64
  load_button.click(load_chat, [enter_chat_name], outputs=[msg,chatbot])
65
 
 
36
  def respond(message, chat_history):
37
  # Basic echo response
38
  chat_history.append((message, "message"))
39
+ return "", chat_history
 
 
40
 
41
  def save_chat(chat_history):
42
  global current_chat_id
 
57
 
58
 
59
  enter_chat_name.change(load_chat, [enter_chat_name], outputs=[msg,chatbot])
60
+ msg.submit(respond, [msg, chatbot], [msg, chatbot])
61
  save_button.click(save_chat, [chatbot], outputs=[display_chat_names,chatbot,audio_input2]) # Added display_chat_names as an output
62
  load_button.click(load_chat, [enter_chat_name], outputs=[msg,chatbot])
63