ndurner commited on
Commit
c884a97
·
2 Parent(s): 18b589c 2caa575

Merge branch 'main' of https://github.com/ndurner/amz_bedrock_chat

Browse files
Files changed (1) hide show
  1. llm.py +3 -3
llm.py CHANGED
@@ -41,10 +41,10 @@ class LLM:
41
  user_msg_parts = []
42
 
43
  content = msg['content']
44
- if isinstance(content, gradio.File):
45
  user_msg_parts.extend(self._process_file(content.value['path']))
46
- elif isinstance(content, gradio.Image):
47
- user_msg_parts.extend(self._process_file(content.value["path"]))
48
  else:
49
  user_msg_parts.extend([{"text": content}])
50
 
 
41
  user_msg_parts = []
42
 
43
  content = msg['content']
44
+ if isinstance(content, gradio.File) or isinstance(content, gradio.Image):
45
  user_msg_parts.extend(self._process_file(content.value['path']))
46
+ elif isinstance(content, tuple):
47
+ user_msg_parts.extend(self._process_file(content[0]))
48
  else:
49
  user_msg_parts.extend([{"text": content}])
50