We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 586a2f6 commit 2ea729cCopy full SHA for 2ea729c
fastchat/serve/gradio_block_arena_vision.py
@@ -85,14 +85,16 @@ def is_pdf(file_path):
85
86
87
def set_visible_image(textbox):
88
+ import filetype
89
+
90
files = textbox["files"]
91
if len(files) == 0:
92
return invisible_image_column
93
elif len(files) > 1:
94
gr.Warning(
- "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."
96
)
- elif is_image(files[0]):
97
+ elif filetype.is_image(files[0]):
98
return visible_image_column
99
100
0 commit comments