nxphi47 commited on
Commit
bdbbfdb
1 Parent(s): 6f7571e

Update multipurpose_chatbot/demos/multimodal_chat_interface.py

Browse files
multipurpose_chatbot/demos/multimodal_chat_interface.py CHANGED
@@ -38,9 +38,11 @@ from .chat_interface import (
38
  get_datetime_string,
39
  chat_response_stream_multiturn_engine,
40
  ChatInterfaceDemo,
 
41
  CustomizedChatInterface,
42
  )
43
 
 
44
  from gradio.events import Events
45
 
46
  import inspect
@@ -946,6 +948,8 @@ def vision_chat_response_stream_multiturn_engine(
946
  else:
947
  response, num_tokens = outputs, -1
948
  yield response, num_tokens
 
 
949
 
950
  if response is not None:
951
  yield response, num_tokens
@@ -993,6 +997,8 @@ def doc_chat_response_stream_multiturn_engine(
993
  else:
994
  response, num_tokens = outputs, -1
995
  yield response, num_tokens
 
 
996
 
997
  if response is not None:
998
  yield response, num_tokens
@@ -1047,6 +1053,8 @@ def vision_doc_chat_response_stream_multiturn_engine(
1047
  else:
1048
  response, num_tokens = outputs, -1
1049
  yield response, num_tokens
 
 
1050
 
1051
  if response is not None:
1052
  yield response, num_tokens
 
38
  get_datetime_string,
39
  chat_response_stream_multiturn_engine,
40
  ChatInterfaceDemo,
41
+ format_conversation,
42
  CustomizedChatInterface,
43
  )
44
 
45
+
46
  from gradio.events import Events
47
 
48
  import inspect
 
948
  else:
949
  response, num_tokens = outputs, -1
950
  yield response, num_tokens
951
+
952
+ print(format_conversation(history + [[None, response]]))
953
 
954
  if response is not None:
955
  yield response, num_tokens
 
997
  else:
998
  response, num_tokens = outputs, -1
999
  yield response, num_tokens
1000
+
1001
+ print(format_conversation(history + [[None, response]]))
1002
 
1003
  if response is not None:
1004
  yield response, num_tokens
 
1053
  else:
1054
  response, num_tokens = outputs, -1
1055
  yield response, num_tokens
1056
+
1057
+ print(format_conversation(history + [[None, response]]))
1058
 
1059
  if response is not None:
1060
  yield response, num_tokens