Spaces:
Runtime error
Runtime error
justinxzhao
commited on
Commit
·
ed3afcd
1
Parent(s):
ca1e7f4
Show num words by default.
Browse files
app.py
CHANGED
@@ -91,7 +91,6 @@ def app():
|
|
91 |
text=df["model_name"],
|
92 |
marker=dict(size=5, color="skyblue"),
|
93 |
showlegend=True,
|
94 |
-
visible="legendonly", # Make 'words' trace initially visible only in legend
|
95 |
)
|
96 |
)
|
97 |
fig.add_trace(
|
@@ -103,6 +102,7 @@ def app():
|
|
103 |
text=df["model_name"],
|
104 |
marker=dict(size=5, color="orange"),
|
105 |
showlegend=True,
|
|
|
106 |
)
|
107 |
)
|
108 |
|
@@ -118,7 +118,6 @@ def app():
|
|
118 |
text=selected_data["model_name"],
|
119 |
marker=dict(size=10, color="blue"),
|
120 |
showlegend=True,
|
121 |
-
visible="legendonly", # Make 'selected words' trace initially visible only in legend
|
122 |
)
|
123 |
)
|
124 |
fig.add_trace(
|
@@ -130,6 +129,7 @@ def app():
|
|
130 |
text=selected_data["model_name"],
|
131 |
marker=dict(size=10, color="orangered"),
|
132 |
showlegend=True,
|
|
|
133 |
)
|
134 |
)
|
135 |
|
@@ -151,10 +151,10 @@ def app():
|
|
151 |
return model.rsquared
|
152 |
|
153 |
r_squared_words = add_trendline(
|
154 |
-
fig, "num_words_mean", y_column, "words", "blue"
|
155 |
)
|
156 |
r_squared_tokens = add_trendline(
|
157 |
-
fig, "num_tokens_mean", y_column, "tokens", "orangered"
|
158 |
)
|
159 |
|
160 |
# Update layout with titles and labels
|
|
|
91 |
text=df["model_name"],
|
92 |
marker=dict(size=5, color="skyblue"),
|
93 |
showlegend=True,
|
|
|
94 |
)
|
95 |
)
|
96 |
fig.add_trace(
|
|
|
102 |
text=df["model_name"],
|
103 |
marker=dict(size=5, color="orange"),
|
104 |
showlegend=True,
|
105 |
+
visible="legendonly", # Make 'words' trace initially visible only in legend
|
106 |
)
|
107 |
)
|
108 |
|
|
|
118 |
text=selected_data["model_name"],
|
119 |
marker=dict(size=10, color="blue"),
|
120 |
showlegend=True,
|
|
|
121 |
)
|
122 |
)
|
123 |
fig.add_trace(
|
|
|
129 |
text=selected_data["model_name"],
|
130 |
marker=dict(size=10, color="orangered"),
|
131 |
showlegend=True,
|
132 |
+
visible="legendonly", # Make 'selected words' trace initially visible only in legend
|
133 |
)
|
134 |
)
|
135 |
|
|
|
151 |
return model.rsquared
|
152 |
|
153 |
r_squared_words = add_trendline(
|
154 |
+
fig, "num_words_mean", y_column, "words", "blue", visibility=True
|
155 |
)
|
156 |
r_squared_tokens = add_trendline(
|
157 |
+
fig, "num_tokens_mean", y_column, "tokens", "orangered"
|
158 |
)
|
159 |
|
160 |
# Update layout with titles and labels
|