CultriX commited on
Commit
04e697a
·
verified ·
1 Parent(s): d6418da

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -6
app.py CHANGED
@@ -97,7 +97,7 @@ def calculate_highest_combined_score(data, column):
97
  top_combinations[r] = top_combinations[r][:3]
98
  return column, top_combinations
99
 
100
- # Function to display the results of the highest combined scores
101
  def display_highest_combined_scores(data):
102
  score_columns = ['Average', 'AGIEval', 'GPT4All', 'TruthfulQA', 'Bigbench']
103
  with st.spinner('Calculating highest combined scores...'):
@@ -105,11 +105,15 @@ def display_highest_combined_scores(data):
105
  for column, top_combinations in results:
106
  st.subheader(f"Top Combinations for {column}")
107
  for r, combinations in top_combinations.items():
108
- st.write(f"**Number of Models: {r}**")
109
- for score, combination in combinations:
110
- st.write(f"Score: {score}, Models: {', '.join(combination)}")
111
-
112
-
 
 
 
 
113
 
114
 
115
  # Function to create bar chart for a given category
 
97
  top_combinations[r] = top_combinations[r][:3]
98
  return column, top_combinations
99
 
100
+ # Modified function to display the results of the highest combined scores using st.dataframe
101
  def display_highest_combined_scores(data):
102
  score_columns = ['Average', 'AGIEval', 'GPT4All', 'TruthfulQA', 'Bigbench']
103
  with st.spinner('Calculating highest combined scores...'):
 
105
  for column, top_combinations in results:
106
  st.subheader(f"Top Combinations for {column}")
107
  for r, combinations in top_combinations.items():
108
+ # Prepare data for DataFrame
109
+ rows = [{'Score': score, 'Models': ', '.join(combination)} for score, combination in combinations]
110
+ df = pd.DataFrame(rows)
111
+
112
+ # Display using st.dataframe
113
+ st.markdown(f"**Number of Models: {r}**")
114
+ st.dataframe(df, height=150) # Adjust height as necessary
115
+
116
+
117
 
118
 
119
  # Function to create bar chart for a given category