Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -130,6 +130,14 @@ def user_ask(state, chatbot1, chatbot2, textbox):
|
|
| 130 |
# Format the conversation in ChatML format
|
| 131 |
|
| 132 |
return state, chatbot1, chatbot2, textbox,enable_btn,enable_btn
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 133 |
|
| 134 |
# Gradio interface setup
|
| 135 |
with gr.Blocks() as demo:
|
|
@@ -167,11 +175,3 @@ with gr.Blocks() as demo:
|
|
| 167 |
# Launch the Gradio interface
|
| 168 |
|
| 169 |
demo.launch()
|
| 170 |
-
import pandas as pd
|
| 171 |
-
|
| 172 |
-
# Function to generate leaderboard data
|
| 173 |
-
def generate_leaderboard():
|
| 174 |
-
elo_ratings = read_elo_ratings() # Assuming this function returns a dict of {bot_name: elo_score}
|
| 175 |
-
leaderboard_data = pd.DataFrame(list(elo_ratings.items()), columns=['Chatbot', 'ELO Score'])
|
| 176 |
-
leaderboard_data = leaderboard_data.sort_values('ELO Score', ascending=False)
|
| 177 |
-
return leaderboard_data
|
|
|
|
| 130 |
# Format the conversation in ChatML format
|
| 131 |
|
| 132 |
return state, chatbot1, chatbot2, textbox,enable_btn,enable_btn
|
| 133 |
+
import pandas as pd
|
| 134 |
+
|
| 135 |
+
# Function to generate leaderboard data
|
| 136 |
+
def generate_leaderboard():
|
| 137 |
+
elo_ratings = read_elo_ratings() # Assuming this function returns a dict of {bot_name: elo_score}
|
| 138 |
+
leaderboard_data = pd.DataFrame(list(elo_ratings.items()), columns=['Chatbot', 'ELO Score'])
|
| 139 |
+
leaderboard_data = leaderboard_data.sort_values('ELO Score', ascending=False)
|
| 140 |
+
return leaderboard_data
|
| 141 |
|
| 142 |
# Gradio interface setup
|
| 143 |
with gr.Blocks() as demo:
|
|
|
|
| 175 |
# Launch the Gradio interface
|
| 176 |
|
| 177 |
demo.launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|