hwberry2 commited on
Commit
81c648e
·
1 Parent(s): a669973

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -17,7 +17,7 @@ def transcribe(audio):
17
 
18
  return transcript["text"]
19
 
20
- def botResponse(user_input):
21
  #global messages
22
  #messages = msg_contents
23
 
@@ -58,7 +58,7 @@ with gr.Blocks() as demo:
58
  gpt_transcript = gr.Text(label="Chat Transcript")
59
  gpt_voice = gr.Audio(label="Voice Response")
60
  submit_btn.click(transcribe, inputs=user_audio, outputs=user_transcript)
61
- user_transcript.change(botResponse, inputs=user_transcript, outputs=gpt_transcript)
62
  gpt_transcript.change(giveVoice, inputs=gpt_transcript, outputs=gpt_voice)
63
 
64
 
 
17
 
18
  return transcript["text"]
19
 
20
+ def botResponse(user_input, messages):
21
  #global messages
22
  #messages = msg_contents
23
 
 
58
  gpt_transcript = gr.Text(label="Chat Transcript")
59
  gpt_voice = gr.Audio(label="Voice Response")
60
  submit_btn.click(transcribe, inputs=user_audio, outputs=user_transcript)
61
+ user_transcript.change(botResponse, inputs=[user_transcript, messages], outputs=gpt_transcript)
62
  gpt_transcript.change(giveVoice, inputs=gpt_transcript, outputs=gpt_voice)
63
 
64