Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -67,14 +67,15 @@ with gr.Blocks() as demo:
|
|
| 67 |
|
| 68 |
@spaces.GPU
|
| 69 |
def gr_chatinterface_fn(message, history, state, video_path, mode):
|
|
|
|
|
|
|
|
|
|
| 70 |
global gradio_backend
|
| 71 |
if gradio_backend is None:
|
| 72 |
yield '(ZeroGPU needs to initialize model under @spaces.GPU, thanks for waiting...)', state
|
| 73 |
gradio_backend = GradioBackend()
|
| 74 |
yield '(finished initialization, responding...)', state
|
| 75 |
state['video_path'] = video_path
|
| 76 |
-
if mode != 'Conversation':
|
| 77 |
-
yield 'waiting video input...'
|
| 78 |
response, state = gradio_backend(message=message, history=history, state=state, mode=mode, hf_spaces=hf_spaces)
|
| 79 |
yield response, state
|
| 80 |
|
|
|
|
| 67 |
|
| 68 |
@spaces.GPU
|
| 69 |
def gr_chatinterface_fn(message, history, state, video_path, mode):
|
| 70 |
+
if mode != 'Conversation':
|
| 71 |
+
yield 'waiting video input...', state
|
| 72 |
+
return
|
| 73 |
global gradio_backend
|
| 74 |
if gradio_backend is None:
|
| 75 |
yield '(ZeroGPU needs to initialize model under @spaces.GPU, thanks for waiting...)', state
|
| 76 |
gradio_backend = GradioBackend()
|
| 77 |
yield '(finished initialization, responding...)', state
|
| 78 |
state['video_path'] = video_path
|
|
|
|
|
|
|
| 79 |
response, state = gradio_backend(message=message, history=history, state=state, mode=mode, hf_spaces=hf_spaces)
|
| 80 |
yield response, state
|
| 81 |
|