chenjoya commited on
Commit
5c02671
·
1 Parent(s): aec6316
Files changed (1) hide show
  1. app.py +2 -0
app.py CHANGED
@@ -59,6 +59,8 @@ with gr.Blocks() as demo:
59
  gr_radio_mode = gr.Radio(label="Select Mode", choices=["Real-Time Commentary", "Conversation"], elem_id="gr_radio_mode", value='Real-Time Commentary', interactive=True)
60
 
61
  def gr_chatinterface_fn(message, history, state, video_path, mode):
 
 
62
  state['video_path'] = video_path
63
  response, state = gradio_backend(query=message, state=state, mode=mode)
64
  return response, state
 
59
  gr_radio_mode = gr.Radio(label="Select Mode", choices=["Real-Time Commentary", "Conversation"], elem_id="gr_radio_mode", value='Real-Time Commentary', interactive=True)
60
 
61
  def gr_chatinterface_fn(message, history, state, video_path, mode):
62
+ if mode == 'Real-Time Commentary':
63
+ return gradio_backend.waiting_video_response, state
64
  state['video_path'] = video_path
65
  response, state = gradio_backend(query=message, state=state, mode=mode)
66
  return response, state