Spaces:
Running
Running
updating some plot strings
Browse files
app.py
CHANGED
|
@@ -122,7 +122,7 @@ with gr.Blocks() as demo:
|
|
| 122 |
trigrams_df,
|
| 123 |
x="counts",
|
| 124 |
y="trigrams",
|
| 125 |
-
title=f"
|
| 126 |
orientation="h",
|
| 127 |
height=400,
|
| 128 |
)
|
|
@@ -152,18 +152,14 @@ with gr.Blocks() as demo:
|
|
| 152 |
secondary_y=True,
|
| 153 |
)
|
| 154 |
# Add figure title
|
| 155 |
-
fig5.update_layout(title_text="
|
| 156 |
|
| 157 |
# Set x-axis title
|
| 158 |
-
fig5.update_xaxes(title_text="
|
| 159 |
|
| 160 |
# Set y-axes titles
|
| 161 |
-
fig5.update_yaxes(
|
| 162 |
-
|
| 163 |
-
)
|
| 164 |
-
fig5.update_yaxes(
|
| 165 |
-
title_text="<b>secondary</b> yaxis title", secondary_y=True
|
| 166 |
-
)
|
| 167 |
return fig5
|
| 168 |
|
| 169 |
# calculate the total number of words in the speech_html column and add it to a new column
|
|
|
|
| 122 |
trigrams_df,
|
| 123 |
x="counts",
|
| 124 |
y="trigrams",
|
| 125 |
+
title=f"{potus}'s top {n_grams}-grams",
|
| 126 |
orientation="h",
|
| 127 |
height=400,
|
| 128 |
)
|
|
|
|
| 152 |
secondary_y=True,
|
| 153 |
)
|
| 154 |
# Add figure title
|
| 155 |
+
fig5.update_layout(title_text="Address Word Count and ARI")
|
| 156 |
|
| 157 |
# Set x-axis title
|
| 158 |
+
fig5.update_xaxes(title_text="Date of Address")
|
| 159 |
|
| 160 |
# Set y-axes titles
|
| 161 |
+
fig5.update_yaxes(title_text="Word Count", secondary_y=False)
|
| 162 |
+
fig5.update_yaxes(title_text="ARI", secondary_y=True)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 163 |
return fig5
|
| 164 |
|
| 165 |
# calculate the total number of words in the speech_html column and add it to a new column
|