chenjoya commited on
Commit
ba2dfcb
·
verified ·
1 Parent(s): 821526b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -41,8 +41,6 @@ with gr.Blocks() as demo:
41
  gr_video_state = gr.JSON({}, visible=False) # only record video state, belong to gr_state but lightweight
42
  gr_static_trigger = gr.Number(value=0, visible=False) # control start streaming or stop
43
  gr_dynamic_trigger = gr.Number(value=0, visible=False) # for continuous refresh
44
-
45
- gradio_backend = GradioBackend()
46
 
47
  with gr.Row():
48
  with gr.Column():
@@ -76,9 +74,9 @@ with gr.Blocks() as demo:
76
  gradio_backend.init_model(device='cuda')
77
  state['video_path'] = video_path
78
  return gradio_backend(query=message, state=state, mode=mode)
79
-
80
  def gr_chatinterface_chatbot_clear_fn():
81
  return {}, {}, 0, 0
 
82
  gr_chatinterface = gr.ChatInterface(
83
  fn=gr_chatinterface_fn,
84
  type="messages",
 
41
  gr_video_state = gr.JSON({}, visible=False) # only record video state, belong to gr_state but lightweight
42
  gr_static_trigger = gr.Number(value=0, visible=False) # control start streaming or stop
43
  gr_dynamic_trigger = gr.Number(value=0, visible=False) # for continuous refresh
 
 
44
 
45
  with gr.Row():
46
  with gr.Column():
 
74
  gradio_backend.init_model(device='cuda')
75
  state['video_path'] = video_path
76
  return gradio_backend(query=message, state=state, mode=mode)
 
77
  def gr_chatinterface_chatbot_clear_fn():
78
  return {}, {}, 0, 0
79
+ gradio_backend = GradioBackend()
80
  gr_chatinterface = gr.ChatInterface(
81
  fn=gr_chatinterface_fn,
82
  type="messages",