Spaces:
Runtime error
Runtime error
some more minor changes
Browse files
app.py
CHANGED
@@ -171,21 +171,6 @@ def main(from_date,
|
|
171 |
plt.title(title, fontdict=font1)
|
172 |
return fig
|
173 |
|
174 |
-
# Define a function that gives the proportion of sentiments as a function of date
|
175 |
-
def sentiment_date(df, col_name, title):
|
176 |
-
if df.empty:
|
177 |
-
return None
|
178 |
-
else:
|
179 |
-
df = sentiment_date_input(df, col_name, LIMIT)
|
180 |
-
labels = df[col_name].to_list()
|
181 |
-
sizes = df['frequency'].values
|
182 |
-
# explode = (0, 0.1, 0, 0, 0) # only "explode" the 2nd slice (i.e. 'Hogs')
|
183 |
-
font1 = {'family': 'serif', 'color': 'blue', 'size': 20}
|
184 |
-
fig = plt.figure()
|
185 |
-
plt.pie(sizes, labels=labels, radius=1, autopct='%1.1f%%')
|
186 |
-
plt.title(title, fontdict=font1)
|
187 |
-
return fig
|
188 |
-
|
189 |
# text_classifier = tc.TextClassifier(from_date=from_date, to_date=to_date,
|
190 |
# user_list=match_name_lower_case(usr_name_choices),
|
191 |
# num_tweets=NUM_TWEETS)
|
171 |
plt.title(title, fontdict=font1)
|
172 |
return fig
|
173 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
174 |
# text_classifier = tc.TextClassifier(from_date=from_date, to_date=to_date,
|
175 |
# user_list=match_name_lower_case(usr_name_choices),
|
176 |
# num_tweets=NUM_TWEETS)
|