Skip to content

Commit 2ef314b

Browse files
committed
Format
1 parent d7a152a commit 2ef314b

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

fastchat/serve/gradio_block_arena_vision_anony.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,9 @@ def add_text(
333333

334334
# Use the first state to get the moderation response because this is based on user input so it is independent of the model
335335
moderation_image_input = images[0] if len(images) > 0 else None
336-
moderation_type_to_response_map = states[0].content_moderator.image_and_text_moderation_filter(
336+
moderation_type_to_response_map = states[
337+
0
338+
].content_moderator.image_and_text_moderation_filter(
337339
moderation_image_input, text, model_list, do_moderation=True
338340
)
339341
text_flagged, nsfw_flag, csam_flag = (

fastchat/serve/gradio_block_arena_vision_named.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -257,7 +257,9 @@ def add_text(
257257

258258
# Use the first state to get the moderation response because this is based on user input so it is independent of the model
259259
moderation_image_input = images[0] if len(images) > 0 else None
260-
moderation_type_to_response_map = states[0].content_moderator.image_and_text_moderation_filter(
260+
moderation_type_to_response_map = states[
261+
0
262+
].content_moderator.image_and_text_moderation_filter(
261263
moderation_image_input, text, model_list, do_moderation=False
262264
)
263265
text_flagged, nsfw_flag, csam_flag = (

0 commit comments

Comments
 (0)