Skip to content

Commit e4f0cb6

Browse files
authored
fix mllama gradio if path is string (#2672)
1 parent f80c96a commit e4f0cb6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

notebooks/mllama-3.2/gradio_helper.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,8 @@ def bot_streaming(message, history):
2727
# message["files"][-1] is a Dict or just a string
2828
if isinstance(files[-1], dict):
2929
image = files[-1]["path"]
30+
elif isinstance(files[-1], str):
31+
image = files[-1]
3032
else:
3133
image = files[-1] if isinstance(files[-1], (list, tuple)) else files[-1].path
3234
else:

0 commit comments

Comments
 (0)