Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
infwinston committed Oct 20, 2023
1 parent 4a064f2 commit a61e644
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
26 changes: 13 additions & 13 deletions fastchat/serve/gradio_block_arena_anony.py
Original file line number Diff line number Diff line change
Expand Up @@ -255,19 +255,19 @@ def add_text(
* 6
)

if ip_expiration_dict[ip] < time.time():
logger.info(f"inactive (anony). ip: {request.client.host}. text: {text}")
for i in range(num_sides):
states[i].skip_next = True
return (
states
+ [x.to_gradio_chatbot() for x in states]
+ [INACTIVE_MSG]
+ [
no_change_btn,
]
* 6
)
# if ip_expiration_dict[ip] < time.time():
# logger.info(f"inactive (anony). ip: {request.client.host}. text: {text}")
# for i in range(num_sides):
# states[i].skip_next = True
# return (
# states
# + [x.to_gradio_chatbot() for x in states]
# + [INACTIVE_MSG]
# + [
# no_change_btn,
# ]
# * 6
# )

if enable_moderation:
flagged = violates_moderation(text)
Expand Down
26 changes: 13 additions & 13 deletions fastchat/serve/gradio_block_arena_named.py
Original file line number Diff line number Diff line change
Expand Up @@ -170,19 +170,19 @@ def add_text(
* 6
)

if ip_expiration_dict[ip] < time.time():
logger.info(f"inactive (named). ip: {request.client.host}. text: {text}")
for i in range(num_sides):
states[i].skip_next = True
return (
states
+ [x.to_gradio_chatbot() for x in states]
+ [INACTIVE_MSG]
+ [
no_change_btn,
]
* 6
)
# if ip_expiration_dict[ip] < time.time():
# logger.info(f"inactive (named). ip: {request.client.host}. text: {text}")
# for i in range(num_sides):
# states[i].skip_next = True
# return (
# states
# + [x.to_gradio_chatbot() for x in states]
# + [INACTIVE_MSG]
# + [
# no_change_btn,
# ]
# * 6
# )

if enable_moderation:
flagged = violates_moderation(text)
Expand Down

0 comments on commit a61e644

Please sign in to comment.