Sa-m commited on
Commit
b8c6825
1 Parent(s): 8f3348c

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -241,7 +241,7 @@ def wordCloud(orgIm,mask_img,text_Party_pr,maxWord=2000,colorGener=True,contCol=
241
  else:
242
  plt.imshow(wordcloud)
243
 
244
- plt.figure(figsize=[15,12])
245
  plt.axis("off")
246
 
247
  def word_cloud_generator(parsed_text_name,text_Party):
@@ -251,7 +251,7 @@ def word_cloud_generator(parsed_text_name,text_Party):
251
  orgImg=Original_Image('BJPMain.jpg')
252
  bwImg=Image_Processed('BJPMain.jpg')
253
  wordCloud(orgImg,bwImg,text_Party,maxWord=3000,colorGener=True,contCol='white',bckColor='black')
254
- plt.figure(figsize=[15,12])
255
  plt.tight_layout()
256
  buf = BytesIO()
257
  plt.savefig(buf)
@@ -266,7 +266,7 @@ def word_cloud_generator(parsed_text_name,text_Party):
266
  bwImg=Image_Processed('congrsMain.jpg')
267
 
268
  wordCloud(orgImg,bwImg,text_Party,maxWord=3000,colorGener=True)
269
- plt.figure(figsize=[15,12])
270
  plt.tight_layout()
271
  buf = BytesIO()
272
  plt.savefig(buf)
@@ -280,7 +280,7 @@ def word_cloud_generator(parsed_text_name,text_Party):
280
  orgImg=Original_Image('AAPMain.jpg')
281
  bwImg=Image_Processed('AAPMain.jpg')
282
  wordCloud(orgImg,bwImg,text_Party,maxWord=3000,colorGener=False,contCol='black')
283
- plt.figure(figsize=[15,12])
284
  plt.tight_layout()
285
  buf = BytesIO()
286
  plt.savefig(buf)
@@ -291,10 +291,9 @@ def word_cloud_generator(parsed_text_name,text_Party):
291
 
292
  else :
293
  wordcloud = WordCloud(max_words=2000, background_color="white",mode="RGB").generate(text_Party)
294
- plt.figure(figsize=(4,3))
295
  plt.imshow(wordcloud, interpolation="bilinear")
296
  plt.axis("off")
297
- plt.figure(figsize=[15,12])
298
  plt.tight_layout()
299
  buf = BytesIO()
300
  plt.savefig(buf)
 
241
  else:
242
  plt.imshow(wordcloud)
243
 
244
+
245
  plt.axis("off")
246
 
247
  def word_cloud_generator(parsed_text_name,text_Party):
 
251
  orgImg=Original_Image('BJPMain.jpg')
252
  bwImg=Image_Processed('BJPMain.jpg')
253
  wordCloud(orgImg,bwImg,text_Party,maxWord=3000,colorGener=True,contCol='white',bckColor='black')
254
+ plt.figure(figsize=(15,12))
255
  plt.tight_layout()
256
  buf = BytesIO()
257
  plt.savefig(buf)
 
266
  bwImg=Image_Processed('congrsMain.jpg')
267
 
268
  wordCloud(orgImg,bwImg,text_Party,maxWord=3000,colorGener=True)
269
+ plt.figure(figsize=(15,12))
270
  plt.tight_layout()
271
  buf = BytesIO()
272
  plt.savefig(buf)
 
280
  orgImg=Original_Image('AAPMain.jpg')
281
  bwImg=Image_Processed('AAPMain.jpg')
282
  wordCloud(orgImg,bwImg,text_Party,maxWord=3000,colorGener=False,contCol='black')
283
+ plt.figure(figsize=(15,12))
284
  plt.tight_layout()
285
  buf = BytesIO()
286
  plt.savefig(buf)
 
291
 
292
  else :
293
  wordcloud = WordCloud(max_words=2000, background_color="white",mode="RGB").generate(text_Party)
294
+ plt.figure(figsize=(15,12))
295
  plt.imshow(wordcloud, interpolation="bilinear")
296
  plt.axis("off")
 
297
  plt.tight_layout()
298
  buf = BytesIO()
299
  plt.savefig(buf)