Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -250,8 +250,9 @@ def word_cloud_generator(parsed_text_name,text_Party):
|
|
250 |
if 'bjp' in parsed:
|
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)
|
@@ -264,9 +265,9 @@ def word_cloud_generator(parsed_text_name,text_Party):
|
|
264 |
elif 'congress' in parsed:
|
265 |
orgImg=Original_Image('congrsMain.jpg')
|
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)
|
@@ -279,8 +280,9 @@ def word_cloud_generator(parsed_text_name,text_Party):
|
|
279 |
elif 'aap' in parsed:
|
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)
|
|
|
250 |
if 'bjp' in parsed:
|
251 |
orgImg=Original_Image('BJPMain.jpg')
|
252 |
bwImg=Image_Processed('BJPMain.jpg')
|
|
|
253 |
plt.figure(figsize=(15,12))
|
254 |
+
wordCloud(orgImg,bwImg,text_Party,maxWord=3000,colorGener=True,contCol='white',bckColor='black')
|
255 |
+
|
256 |
plt.tight_layout()
|
257 |
buf = BytesIO()
|
258 |
plt.savefig(buf)
|
|
|
265 |
elif 'congress' in parsed:
|
266 |
orgImg=Original_Image('congrsMain.jpg')
|
267 |
bwImg=Image_Processed('congrsMain.jpg')
|
|
|
|
|
268 |
plt.figure(figsize=(15,12))
|
269 |
+
wordCloud(orgImg,bwImg,text_Party,maxWord=3000,colorGener=True)
|
270 |
+
|
271 |
plt.tight_layout()
|
272 |
buf = BytesIO()
|
273 |
plt.savefig(buf)
|
|
|
280 |
elif 'aap' in parsed:
|
281 |
orgImg=Original_Image('AAPMain.jpg')
|
282 |
bwImg=Image_Processed('AAPMain.jpg')
|
|
|
283 |
plt.figure(figsize=(15,12))
|
284 |
+
wordCloud(orgImg,bwImg,text_Party,maxWord=3000,colorGener=False,contCol='black')
|
285 |
+
|
286 |
plt.tight_layout()
|
287 |
buf = BytesIO()
|
288 |
plt.savefig(buf)
|