Spaces:
Running
Running
remove some models not working
Browse filesalso add thank you message prompt
- app.py +32 -17
- context_window.json +0 -3
app.py
CHANGED
|
@@ -555,6 +555,9 @@ with gr.Blocks() as app:
|
|
| 555 |
gr.update(visible=False), # Hide the timeout popup if it was visible
|
| 556 |
model_a_send_state, # Set model_a_send button state
|
| 557 |
model_b_send_state, # Set model_b_send button state
|
|
|
|
|
|
|
|
|
|
| 558 |
)
|
| 559 |
|
| 560 |
# Feedback panel, initially hidden
|
|
@@ -567,6 +570,13 @@ with gr.Blocks() as app:
|
|
| 567 |
)
|
| 568 |
submit_feedback_btn = gr.Button("Submit Feedback", interactive=False)
|
| 569 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 570 |
# Function to handle login
|
| 571 |
def handle_login():
|
| 572 |
"""
|
|
@@ -625,24 +635,27 @@ with gr.Blocks() as app:
|
|
| 625 |
|
| 626 |
# First round handling
|
| 627 |
send_first.click(
|
| 628 |
-
|
|
|
|
|
|
|
| 629 |
inputs=[shared_input, models_state, conversation_state],
|
| 630 |
outputs=[
|
| 631 |
-
shared_input,
|
| 632 |
-
user_prompt_md,
|
| 633 |
-
response_a_title,
|
| 634 |
-
response_b_title,
|
| 635 |
-
response_a,
|
| 636 |
-
response_b,
|
| 637 |
-
multi_round_inputs,
|
| 638 |
-
vote_panel,
|
| 639 |
-
send_first,
|
| 640 |
-
feedback,
|
| 641 |
-
models_state,
|
| 642 |
-
conversation_state,
|
| 643 |
-
timeout_popup,
|
| 644 |
-
model_a_send,
|
| 645 |
-
model_b_send,
|
|
|
|
| 646 |
],
|
| 647 |
)
|
| 648 |
|
|
@@ -762,7 +775,7 @@ with gr.Blocks() as app:
|
|
| 762 |
return (
|
| 763 |
gr.update(
|
| 764 |
value="", interactive=True, visible=True
|
| 765 |
-
), # Clear
|
| 766 |
gr.update(value="", visible=False), # Hide user_prompt_md
|
| 767 |
gr.update(value="", visible=False), # Hide response_a_title
|
| 768 |
gr.update(value="", visible=False), # Hide response_b_title
|
|
@@ -777,6 +790,7 @@ with gr.Blocks() as app:
|
|
| 777 |
value="Can't Decide", interactive=True
|
| 778 |
), # Reset feedback selection
|
| 779 |
leaderboard_data, # Updated leaderboard data
|
|
|
|
| 780 |
)
|
| 781 |
|
| 782 |
# Update the click event for the submit feedback button
|
|
@@ -795,6 +809,7 @@ with gr.Blocks() as app:
|
|
| 795 |
send_first, # Reset and update send_first button
|
| 796 |
feedback, # Reset feedback selection
|
| 797 |
leaderboard_component, # Update leaderboard data dynamically
|
|
|
|
| 798 |
],
|
| 799 |
)
|
| 800 |
|
|
|
|
| 555 |
gr.update(visible=False), # Hide the timeout popup if it was visible
|
| 556 |
model_a_send_state, # Set model_a_send button state
|
| 557 |
model_b_send_state, # Set model_b_send button state
|
| 558 |
+
gr.update(
|
| 559 |
+
visible=False
|
| 560 |
+
), # thanks_message - Make sure to return it as invisible here as well
|
| 561 |
)
|
| 562 |
|
| 563 |
# Feedback panel, initially hidden
|
|
|
|
| 570 |
)
|
| 571 |
submit_feedback_btn = gr.Button("Submit Feedback", interactive=False)
|
| 572 |
|
| 573 |
+
thanks_message = gr.Markdown(
|
| 574 |
+
value="## Thanks for your vote!", visible=False
|
| 575 |
+
) # Add thank you message
|
| 576 |
+
|
| 577 |
+
def hide_thanks_message():
|
| 578 |
+
return gr.update(visible=False)
|
| 579 |
+
|
| 580 |
# Function to handle login
|
| 581 |
def handle_login():
|
| 582 |
"""
|
|
|
|
| 635 |
|
| 636 |
# First round handling
|
| 637 |
send_first.click(
|
| 638 |
+
fn=hide_thanks_message, inputs=[], outputs=[thanks_message]
|
| 639 |
+
).then(
|
| 640 |
+
fn=update_model_titles_and_responses,
|
| 641 |
inputs=[shared_input, models_state, conversation_state],
|
| 642 |
outputs=[
|
| 643 |
+
shared_input,
|
| 644 |
+
user_prompt_md,
|
| 645 |
+
response_a_title,
|
| 646 |
+
response_b_title,
|
| 647 |
+
response_a,
|
| 648 |
+
response_b,
|
| 649 |
+
multi_round_inputs,
|
| 650 |
+
vote_panel,
|
| 651 |
+
send_first,
|
| 652 |
+
feedback,
|
| 653 |
+
models_state,
|
| 654 |
+
conversation_state,
|
| 655 |
+
timeout_popup,
|
| 656 |
+
model_a_send,
|
| 657 |
+
model_b_send,
|
| 658 |
+
thanks_message,
|
| 659 |
],
|
| 660 |
)
|
| 661 |
|
|
|
|
| 775 |
return (
|
| 776 |
gr.update(
|
| 777 |
value="", interactive=True, visible=True
|
| 778 |
+
), # Clear shared_input
|
| 779 |
gr.update(value="", visible=False), # Hide user_prompt_md
|
| 780 |
gr.update(value="", visible=False), # Hide response_a_title
|
| 781 |
gr.update(value="", visible=False), # Hide response_b_title
|
|
|
|
| 790 |
value="Can't Decide", interactive=True
|
| 791 |
), # Reset feedback selection
|
| 792 |
leaderboard_data, # Updated leaderboard data
|
| 793 |
+
gr.update(visible=True), # Show the thanks message
|
| 794 |
)
|
| 795 |
|
| 796 |
# Update the click event for the submit feedback button
|
|
|
|
| 809 |
send_first, # Reset and update send_first button
|
| 810 |
feedback, # Reset feedback selection
|
| 811 |
leaderboard_component, # Update leaderboard data dynamically
|
| 812 |
+
thanks_message, # Show the "Thanks for your vote!" message
|
| 813 |
],
|
| 814 |
)
|
| 815 |
|
context_window.json
CHANGED
|
@@ -1,13 +1,11 @@
|
|
| 1 |
{
|
| 2 |
"gpt-3.5-turbo": 16000,
|
| 3 |
"gpt-3.5-turbo-16k": 16000,
|
| 4 |
-
"gpt-3.5-turbo-instruct" : 16000,
|
| 5 |
"gpt-4": 8192,
|
| 6 |
"gpt-4-32k": 32000,
|
| 7 |
"gpt-4-turbo": 128000,
|
| 8 |
"gpt-4o": 128000,
|
| 9 |
"gpt-4o-mini": 128000,
|
| 10 |
-
"chatgpt-4o-latest": 128000,
|
| 11 |
"claude-3-5-sonnet-latest" : 200000,
|
| 12 |
"deepseek-chat": 64000,
|
| 13 |
"gemini-1.5-flash-latest": 1048576,
|
|
@@ -21,7 +19,6 @@
|
|
| 21 |
"llama-v3.2-3b": 128000,
|
| 22 |
"o1-all": 128000,
|
| 23 |
"o1-mini-all": 128000,
|
| 24 |
-
"o1-preview-all": 128000,
|
| 25 |
"Qwen2-72B-Instruct": 131072,
|
| 26 |
"Qwen2.5-32B-Instruct": 131072,
|
| 27 |
"qwen2.5-72b": 32768,
|
|
|
|
| 1 |
{
|
| 2 |
"gpt-3.5-turbo": 16000,
|
| 3 |
"gpt-3.5-turbo-16k": 16000,
|
|
|
|
| 4 |
"gpt-4": 8192,
|
| 5 |
"gpt-4-32k": 32000,
|
| 6 |
"gpt-4-turbo": 128000,
|
| 7 |
"gpt-4o": 128000,
|
| 8 |
"gpt-4o-mini": 128000,
|
|
|
|
| 9 |
"claude-3-5-sonnet-latest" : 200000,
|
| 10 |
"deepseek-chat": 64000,
|
| 11 |
"gemini-1.5-flash-latest": 1048576,
|
|
|
|
| 19 |
"llama-v3.2-3b": 128000,
|
| 20 |
"o1-all": 128000,
|
| 21 |
"o1-mini-all": 128000,
|
|
|
|
| 22 |
"Qwen2-72B-Instruct": 131072,
|
| 23 |
"Qwen2.5-32B-Instruct": 131072,
|
| 24 |
"qwen2.5-72b": 32768,
|