chenjoya commited on
Commit
9644d7b
·
verified ·
1 Parent(s): 25fa95d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -3
app.py CHANGED
@@ -60,15 +60,16 @@ with gr.Blocks() as demo:
60
  @spaces.GPU
61
  def gr_chatinterface_fn(message, history, state, video_path, mode):
62
  global gradio_backend
63
- yield '(initializing model, thanks for waiting...)', state
64
  if gradio_backend is None:
65
  gradio_backend = GradioBackend()
66
  state['video_path'] = video_path
67
  yield '(finished initialization, responding...)', state
68
  if mode != 'Conversation':
69
- yield 'waiting video input...', state
70
  response, _ = gradio_backend(query=message, state=state, mode=mode)
71
- return response, {}
 
72
 
73
  def gr_chatinterface_chatbot_clear_fn():
74
  return {}, {}, 0, 0
 
60
  @spaces.GPU
61
  def gr_chatinterface_fn(message, history, state, video_path, mode):
62
  global gradio_backend
63
+ # yield '(initializing model, thanks for waiting...)', state
64
  if gradio_backend is None:
65
  gradio_backend = GradioBackend()
66
  state['video_path'] = video_path
67
  yield '(finished initialization, responding...)', state
68
  if mode != 'Conversation':
69
+ # yield 'waiting video input...', state
70
  response, _ = gradio_backend(query=message, state=state, mode=mode)
71
+ # yield response, {}
72
+ return response, state
73
 
74
  def gr_chatinterface_chatbot_clear_fn():
75
  return {}, {}, 0, 0