johnowhitaker commited on
Commit
b360479
1 Parent(s): f42cc17

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -14,7 +14,7 @@ import csv
14
  import urllib.request
15
  import IPython.display as ipd
16
 
17
- title = st.title('Loading')
18
 
19
  # Preprocess text (username and link placeholders)
20
  def preprocess(text):
@@ -98,7 +98,7 @@ if submitted:
98
  tweets['sentiment'] = tweets['tweet'].map(lambda s: combined_score(s))
99
  tweets['tweet_length'] = tweets['tweet'].map(lambda s: len(s))
100
  st.write("Average sentiment:", tweets.sentiment.mean())
101
- fig, axs = plt.subplots(1, 2)
102
  axs[0].hexbin(tweets['tweet_length'], tweets['sentiment']*1,
103
  gridsize=20, bins=12, cmap='inferno')
104
  axs[1].scatter(tweets['tweet_length'], tweets['sentiment'])
 
14
  import urllib.request
15
  import IPython.display as ipd
16
 
17
+ st.write('Loading...')
18
 
19
  # Preprocess text (username and link placeholders)
20
  def preprocess(text):
 
98
  tweets['sentiment'] = tweets['tweet'].map(lambda s: combined_score(s))
99
  tweets['tweet_length'] = tweets['tweet'].map(lambda s: len(s))
100
  st.write("Average sentiment:", tweets.sentiment.mean())
101
+ fig, axs = plt.subplots(1, 2, figsize=(12, 6))
102
  axs[0].hexbin(tweets['tweet_length'], tweets['sentiment']*1,
103
  gridsize=20, bins=12, cmap='inferno')
104
  axs[1].scatter(tweets['tweet_length'], tweets['sentiment'])