Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -60,7 +60,7 @@ with gr.Blocks() as demo:
|
|
| 60 |
@spaces.GPU
|
| 61 |
def gr_chatinterface_fn(message, history, state, video_path, mode):
|
| 62 |
global gradio_backend
|
| 63 |
-
|
| 64 |
if gradio_backend is None:
|
| 65 |
gradio_backend = GradioBackend()
|
| 66 |
state['video_path'] = video_path
|
|
@@ -68,7 +68,7 @@ with gr.Blocks() as demo:
|
|
| 68 |
if mode != 'Conversation':
|
| 69 |
yield 'waiting video input...', state
|
| 70 |
response, state = gradio_backend(query=message, state=state, mode=mode)
|
| 71 |
-
yield 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
|
|
|
|
| 68 |
if mode != 'Conversation':
|
| 69 |
yield 'waiting video input...', state
|
| 70 |
response, state = gradio_backend(query=message, state=state, mode=mode)
|
| 71 |
+
yield response, {}
|
| 72 |
|
| 73 |
def gr_chatinterface_chatbot_clear_fn():
|
| 74 |
return {}, {}, 0, 0
|