Spaces:
Running
Running
Merge branch 'main' of https://github.com/ndurner/amz_bedrock_chat
Browse files
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,
|
47 |
-
user_msg_parts.extend(self._process_file(content
|
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 |
|