Spaces:
Sleeping
Sleeping
update changes
Browse files
app.py
CHANGED
@@ -36,6 +36,7 @@ class LLaMAScoreAnalyzer:
|
|
36 |
return df
|
37 |
|
38 |
def draw_specific_plots(self, data, categories, x_variable, title):
|
|
|
39 |
fig, ax = plt.subplots(figsize=(12, 6))
|
40 |
|
41 |
palette = sns.color_palette("pastel", len(categories) * len(data[x_variable].unique()))
|
@@ -48,7 +49,7 @@ class LLaMAScoreAnalyzer:
|
|
48 |
label=f"{category} ({unique_value})")
|
49 |
|
50 |
ax.set_title(title, fontsize=16)
|
51 |
-
ax.set_xlabel(
|
52 |
ax.set_ylabel("Density", fontsize=12)
|
53 |
ax.legend(title="Category (Language/Model)")
|
54 |
|
@@ -72,7 +73,7 @@ class LLaMAScoreAnalyzer:
|
|
72 |
def draw_bar_plot(self, data, categories, x_variable, title):
|
73 |
fig, axs = plt.subplots(len(categories), 1, figsize=(10, 6 * len(categories)))
|
74 |
|
75 |
-
palette = sns.color_palette("pastel", len(
|
76 |
|
77 |
if len(categories) == 1:
|
78 |
axs = [axs] # Ensure axs is iterable even for a single plot
|
@@ -116,13 +117,13 @@ class LLaMAScoreAnalyzer:
|
|
116 |
if detailed_view:
|
117 |
for language in selected_languages:
|
118 |
language_data = combined_data[combined_data['Language'] == language]
|
119 |
-
title = f"Distribution of
|
120 |
fig = self.draw_specific_plots(language_data, selected_gpt_scoring, 'Model', title)
|
121 |
st.pyplot(fig)
|
122 |
if len(selected_languages) > 1:
|
123 |
for model in selected_models:
|
124 |
model_data = combined_data[combined_data['Model'] == model]
|
125 |
-
title = f"Distribution of
|
126 |
fig = self.draw_specific_plots(model_data, selected_gpt_scoring, 'Language', title)
|
127 |
st.pyplot(fig)
|
128 |
|
|
|
36 |
return df
|
37 |
|
38 |
def draw_specific_plots(self, data, categories, x_variable, title):
|
39 |
+
|
40 |
fig, ax = plt.subplots(figsize=(12, 6))
|
41 |
|
42 |
palette = sns.color_palette("pastel", len(categories) * len(data[x_variable].unique()))
|
|
|
49 |
label=f"{category} ({unique_value})")
|
50 |
|
51 |
ax.set_title(title, fontsize=16)
|
52 |
+
ax.set_xlabel("Score", fontsize=12)
|
53 |
ax.set_ylabel("Density", fontsize=12)
|
54 |
ax.legend(title="Category (Language/Model)")
|
55 |
|
|
|
73 |
def draw_bar_plot(self, data, categories, x_variable, title):
|
74 |
fig, axs = plt.subplots(len(categories), 1, figsize=(10, 6 * len(categories)))
|
75 |
|
76 |
+
palette = sns.color_palette("pastel", len(data))
|
77 |
|
78 |
if len(categories) == 1:
|
79 |
axs = [axs] # Ensure axs is iterable even for a single plot
|
|
|
117 |
if detailed_view:
|
118 |
for language in selected_languages:
|
119 |
language_data = combined_data[combined_data['Language'] == language]
|
120 |
+
title = f"Distribution of Scores for {language}"
|
121 |
fig = self.draw_specific_plots(language_data, selected_gpt_scoring, 'Model', title)
|
122 |
st.pyplot(fig)
|
123 |
if len(selected_languages) > 1:
|
124 |
for model in selected_models:
|
125 |
model_data = combined_data[combined_data['Model'] == model]
|
126 |
+
title = f"Distribution of Scores for {model}"
|
127 |
fig = self.draw_specific_plots(model_data, selected_gpt_scoring, 'Language', title)
|
128 |
st.pyplot(fig)
|
129 |
|