futurespyhi commited on
Commit
2e48849
·
1 Parent(s): 1f93c91

modify the logic of response_audio and output binding to make sure current lyrics to be correctly set up

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -680,7 +680,7 @@ def build_interface():
680
  )
681
 
682
  respond_audio = input_audio.stop_recording(
683
- response_audio, [state, input_audio, genre, mood, theme], [state, chatbot]
684
  )
685
 
686
  restart = respond_audio.then(start_recording_user, [state], [input_audio]).then(
@@ -859,7 +859,7 @@ def response_audio(state: AppState, audio: tuple, genre_value, mood_value, theme
859
  for msg in state.conversation:
860
  conversation_display.append({"role": msg["role"], "content": msg["content"]})
861
 
862
- return state, conversation_display
863
 
864
  def extract_lyrics_from_conversation(conversation):
865
  """
 
680
  )
681
 
682
  respond_audio = input_audio.stop_recording(
683
+ response_audio, [state, input_audio, genre, mood, theme], [state, chatbot, lyrics_display]
684
  )
685
 
686
  restart = respond_audio.then(start_recording_user, [state], [input_audio]).then(
 
859
  for msg in state.conversation:
860
  conversation_display.append({"role": msg["role"], "content": msg["content"]})
861
 
862
+ return state, conversation_display, state.lyrics
863
 
864
  def extract_lyrics_from_conversation(conversation):
865
  """