Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
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 |
-
|
|
|
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
|