Skip to content

Commit

Permalink
removed sorting for viz
Browse files Browse the repository at this point in the history
  • Loading branch information
swarali-desai committed Mar 14, 2024
1 parent b1296ac commit 92349bc
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions thronetalk-game-of-thrones-summarizer/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,11 +91,11 @@ def remove_zeros(lst):
characters = list(characters_tuple)
st.subheader(out_text_temp2)
st.markdown('''This line chart visualizes the ***sentiment scores*** across seasons and episodes
for the top 3 most active characters within the range selected by the user,
based ***on-screen time***. Sentiment scores reflect the emotional tone of dialogue
and actions, with positive scores indicating positive sentiment and negative scores
indicating negative sentiment. This visualization allows users to track the
emotional journey of key characters throughout the series, identifying trends,
for the top 3 most active characters within the range selected by the user,
based ***on-screen time***. Sentiment scores reflect the emotional tone of dialogue
and actions, with positive scores indicating positive sentiment and negative scores
indicating negative sentiment. This visualization allows users to track the
emotional journey of key characters throughout the series, identifying trends,
patterns, and significant moments in their development.''')
vg = VisualizationGenerator(
int(season_from),
Expand All @@ -112,7 +112,7 @@ def remove_zeros(lst):
"fill": "white"
}
).encode(
x=alt.X('season-episode:O',title = 'Season:Episode'),
x=alt.X('season-episode:O',title = 'Season:Episode', sort=None),
y=alt.Y('value:Q', title = 'Sentiment score'),
color='character name:N'

Expand All @@ -122,11 +122,11 @@ def remove_zeros(lst):
out_text_2 = f"**{H2} {selected_episode_from} to {selected_episode_to}**"
st.subheader(out_text_2)
st.markdown('''These word clouds display the most frequently used words
associated with the top 3 characters selected from the sentiment
analysis above. Each word cloud visually represents the prominence
of words in the dialogue or actions of these characters throughout
the selected seasons and episodes. Larger words indicate higher
frequency of use, offering users a glimpse into the key themes,
associated with the top 3 characters selected from the sentiment
analysis above. Each word cloud visually represents the prominence
of words in the dialogue or actions of these characters throughout
the selected seasons and episodes. Larger words indicate higher
frequency of use, offering users a glimpse into the key themes,
topics, and attributes associated with each character.''')
columns = st.columns(len(characters))
wordcloud = vg.multi_word_cloud(characters)
Expand Down

0 comments on commit 92349bc

Please sign in to comment.