Skip to content

Commit 2ea729c

Browse files
committed
fix error
1 parent 586a2f6 commit 2ea729c

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

fastchat/serve/gradio_block_arena_vision.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,14 +85,16 @@ def is_pdf(file_path):
8585

8686

8787
def set_visible_image(textbox):
88+
import filetype
89+
8890
files = textbox["files"]
8991
if len(files) == 0:
9092
return invisible_image_column
9193
elif len(files) > 1:
9294
gr.Warning(
93-
"We only support single image conversations. Please start a new round if you would like to chat using this image."
95+
"We only support single image or document conversations. Please start a new round if you would like to chat using this image or document."
9496
)
95-
elif is_image(files[0]):
97+
elif filetype.is_image(files[0]):
9698
return visible_image_column
9799
return invisible_image_column
98100

0 commit comments

Comments
 (0)