Sa-m commited on
Commit
7a4b822
1 Parent(s): f95ec51

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -140,7 +140,7 @@ def fDistancePlot(text2Party,plotN=15):
140
  plt.title('Frequency Distribution')
141
  plt.axis('off')
142
  plt.figure(figsize=(4,3))
143
- fdistance.plot(plotN,color="#139487")
144
  plt.tight_layout()
145
  buf = BytesIO()
146
  plt.savefig(buf)
@@ -164,7 +164,7 @@ def DispersionPlot(textParty):
164
  plt.axis('off')
165
  plt.title('Dispersion Plot')
166
  plt.figure(figsize=(4,3))
167
- moby.dispersion_plot(word_Lst)
168
  plt.tight_layout()
169
  buf = BytesIO()
170
  plt.savefig(buf)
@@ -222,10 +222,8 @@ def analysis(Manifesto,Search):
222
  plt.title('Sentiment Analysis')
223
  plt.xlabel('Sentiment')
224
  plt.ylabel('Counts')
225
- fig, ax = plt.subplots()
226
- ax.set_facecolor("#2E2E2E")
227
  plt.figure(figsize=(4,3))
228
- df['Analysis on Polarity'].value_counts().plot(kind ='bar')
229
  plt.tight_layout()
230
  buf = BytesIO()
231
  plt.savefig(buf)
@@ -234,7 +232,7 @@ def analysis(Manifesto,Search):
234
  plt.clf()
235
 
236
  plt.figure(figsize=(4,3))
237
- df['Analysis on Subjectivity'].value_counts().plot(kind ='bar')
238
  plt.tight_layout()
239
  buf = BytesIO()
240
  plt.savefig(buf)
 
140
  plt.title('Frequency Distribution')
141
  plt.axis('off')
142
  plt.figure(figsize=(4,3))
143
+ fdistance.plot(plotN)
144
  plt.tight_layout()
145
  buf = BytesIO()
146
  plt.savefig(buf)
 
164
  plt.axis('off')
165
  plt.title('Dispersion Plot')
166
  plt.figure(figsize=(4,3))
167
+ moby.dispersion_plot(word_Lst,color="#EF6D6D")
168
  plt.tight_layout()
169
  buf = BytesIO()
170
  plt.savefig(buf)
 
222
  plt.title('Sentiment Analysis')
223
  plt.xlabel('Sentiment')
224
  plt.ylabel('Counts')
 
 
225
  plt.figure(figsize=(4,3))
226
+ df['Analysis on Polarity'].value_counts().plot(kind ='bar',color="#FF9F45")
227
  plt.tight_layout()
228
  buf = BytesIO()
229
  plt.savefig(buf)
 
232
  plt.clf()
233
 
234
  plt.figure(figsize=(4,3))
235
+ df['Analysis on Subjectivity'].value_counts().plot(kind ='bar',color="#B667F1")
236
  plt.tight_layout()
237
  buf = BytesIO()
238
  plt.savefig(buf)