Update src/streamlit_app.py
Browse files- src/streamlit_app.py +5 -5
src/streamlit_app.py
CHANGED
|
@@ -163,7 +163,7 @@ def create_bar_chart(df, view_type):
|
|
| 163 |
df_fig["model"] = df_fig["model"].map(model_renaming_map).fillna(df_fig["model"])
|
| 164 |
|
| 165 |
# TODO Rescale the scores
|
| 166 |
-
good_score_threshold = df_fig[df_fig["model"] == "Human Expert"]["score"].mean()
|
| 167 |
bad_score_threshold = df_fig[df_fig["model"] == "Straight Forward"]["score"].mean()
|
| 168 |
df_fig["score"] = (bad_score_threshold - df_fig["score"]) / (bad_score_threshold - good_score_threshold) * 100
|
| 169 |
|
|
@@ -173,7 +173,7 @@ def create_bar_chart(df, view_type):
|
|
| 173 |
df_fig = df_fig.groupby("model")[["score"]].mean().reset_index()
|
| 174 |
|
| 175 |
# Sort the results from best to worst
|
| 176 |
-
df_fig = df_fig.sort_values(by="score", ascending=
|
| 177 |
|
| 178 |
# Create the Plotly figure
|
| 179 |
fig = px.bar(
|
|
@@ -181,7 +181,7 @@ def create_bar_chart(df, view_type):
|
|
| 181 |
x="model",
|
| 182 |
y="score",
|
| 183 |
color="score",
|
| 184 |
-
color_continuous_scale=px.colors.diverging.
|
| 185 |
orientation="v",
|
| 186 |
)
|
| 187 |
max_score = df_fig["score"].max()
|
|
@@ -234,7 +234,7 @@ def create_bar_chart(df, view_type):
|
|
| 234 |
df_fig["model"] = pd.Categorical(df_fig["model"], categories=model_order, ordered=True)
|
| 235 |
|
| 236 |
# Sort the DataFrame based on the new categorical order
|
| 237 |
-
df_fig = df_fig.sort_values(by=["model", "score"], ascending=[
|
| 238 |
|
| 239 |
# Create the Plotly figure
|
| 240 |
fig = px.bar(
|
|
@@ -315,7 +315,7 @@ def create_bar_chart(df, view_type):
|
|
| 315 |
df_fig["model"] = pd.Categorical(df_fig["model"], categories=model_order, ordered=True)
|
| 316 |
|
| 317 |
# Sort the DataFrame based on the new categorical order
|
| 318 |
-
df_fig = df_fig.sort_values(by=["model", "score"], ascending=[
|
| 319 |
|
| 320 |
# Create the Plotly figure
|
| 321 |
fig = px.bar(
|
|
|
|
| 163 |
df_fig["model"] = df_fig["model"].map(model_renaming_map).fillna(df_fig["model"])
|
| 164 |
|
| 165 |
# TODO Rescale the scores
|
| 166 |
+
good_score_threshold = 0 # df_fig[df_fig["model"] == "Human Expert"]["score"].mean()
|
| 167 |
bad_score_threshold = df_fig[df_fig["model"] == "Straight Forward"]["score"].mean()
|
| 168 |
df_fig["score"] = (bad_score_threshold - df_fig["score"]) / (bad_score_threshold - good_score_threshold) * 100
|
| 169 |
|
|
|
|
| 173 |
df_fig = df_fig.groupby("model")[["score"]].mean().reset_index()
|
| 174 |
|
| 175 |
# Sort the results from best to worst
|
| 176 |
+
df_fig = df_fig.sort_values(by="score", ascending=False)
|
| 177 |
|
| 178 |
# Create the Plotly figure
|
| 179 |
fig = px.bar(
|
|
|
|
| 181 |
x="model",
|
| 182 |
y="score",
|
| 183 |
color="score",
|
| 184 |
+
color_continuous_scale=px.colors.diverging.RdYlBu,
|
| 185 |
orientation="v",
|
| 186 |
)
|
| 187 |
max_score = df_fig["score"].max()
|
|
|
|
| 234 |
df_fig["model"] = pd.Categorical(df_fig["model"], categories=model_order, ordered=True)
|
| 235 |
|
| 236 |
# Sort the DataFrame based on the new categorical order
|
| 237 |
+
df_fig = df_fig.sort_values(by=["model", "score"], ascending=[False, False])
|
| 238 |
|
| 239 |
# Create the Plotly figure
|
| 240 |
fig = px.bar(
|
|
|
|
| 315 |
df_fig["model"] = pd.Categorical(df_fig["model"], categories=model_order, ordered=True)
|
| 316 |
|
| 317 |
# Sort the DataFrame based on the new categorical order
|
| 318 |
+
df_fig = df_fig.sort_values(by=["model", "score"], ascending=[False, False])
|
| 319 |
|
| 320 |
# Create the Plotly figure
|
| 321 |
fig = px.bar(
|