Spaces:
Runtime error
Runtime error
Update multipurpose_chatbot/demos/multimodal_chat_interface.py
Browse files
multipurpose_chatbot/demos/multimodal_chat_interface.py
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
|
|
| 1 |
import os
|
| 2 |
from gradio.themes import ThemeClass as Theme
|
| 3 |
import numpy as np
|
|
@@ -903,6 +904,7 @@ def gradio_history_to_vision_doc_conversation_prompt_paths(
|
|
| 903 |
return full_prompt, image_paths, conversations
|
| 904 |
|
| 905 |
|
|
|
|
| 906 |
def vision_chat_response_stream_multiturn_engine(
|
| 907 |
history: List[Tuple[str, str]],
|
| 908 |
temperature: float,
|
|
@@ -955,6 +957,7 @@ def vision_chat_response_stream_multiturn_engine(
|
|
| 955 |
yield response, num_tokens
|
| 956 |
|
| 957 |
|
|
|
|
| 958 |
def doc_chat_response_stream_multiturn_engine(
|
| 959 |
history: List[Tuple[str, str]],
|
| 960 |
temperature: float,
|
|
@@ -1005,7 +1008,7 @@ def doc_chat_response_stream_multiturn_engine(
|
|
| 1005 |
|
| 1006 |
|
| 1007 |
|
| 1008 |
-
|
| 1009 |
def vision_doc_chat_response_stream_multiturn_engine(
|
| 1010 |
history: List[Tuple[str, str]],
|
| 1011 |
temperature: float,
|
|
|
|
| 1 |
+
import spaces
|
| 2 |
import os
|
| 3 |
from gradio.themes import ThemeClass as Theme
|
| 4 |
import numpy as np
|
|
|
|
| 904 |
return full_prompt, image_paths, conversations
|
| 905 |
|
| 906 |
|
| 907 |
+
@spaces.GPU
|
| 908 |
def vision_chat_response_stream_multiturn_engine(
|
| 909 |
history: List[Tuple[str, str]],
|
| 910 |
temperature: float,
|
|
|
|
| 957 |
yield response, num_tokens
|
| 958 |
|
| 959 |
|
| 960 |
+
@spaces.GPU
|
| 961 |
def doc_chat_response_stream_multiturn_engine(
|
| 962 |
history: List[Tuple[str, str]],
|
| 963 |
temperature: float,
|
|
|
|
| 1008 |
|
| 1009 |
|
| 1010 |
|
| 1011 |
+
@spaces.GPU
|
| 1012 |
def vision_doc_chat_response_stream_multiturn_engine(
|
| 1013 |
history: List[Tuple[str, str]],
|
| 1014 |
temperature: float,
|