Sa-m commited on
Commit
6054550
1 Parent(s): b003072

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -248,8 +248,8 @@ def word_cloud_generator(parsed_text_name,text_Party):
248
  parsed=parsed_text_name.lower()
249
 
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
 
@@ -372,7 +372,7 @@ plot3=gr.outputs.Image(label='Word Cloud')
372
  plot4=gr.outputs.Image(label='Frequency Distribution')
373
  plot5=gr.outputs.Image(label='Dispersion Plot')
374
 
375
- io=gr.Interface(fn=analysis, inputs=[filePdf,Search_txt], outputs=[text,mfw,plot1,plot2,plot3,plot4,plot5], title='Manifesto Analysis',examples=[['manifestos/Bjp_Manifesto_2019.pdf','modi'],['AAP_Manifesto_2019.pdf','delhi'],['manifestos/Congress_Manifesto_2019.pdf','safety']])
376
  io.launch(debug=True,share=False)
377
  #,examples=[['./Bjp_Manifesto_2019.pdf','india'],['./AAP_Manifesto_2019.pdf',],['./Congress_Manifesto_2019.pdf',]]
378
  #allow_screenshot=False, allow_flagging="never",
 
248
  parsed=parsed_text_name.lower()
249
 
250
  if 'bjp' in parsed:
251
+ orgImg=Original_Image('bjpImg2.jpg')
252
+ bwImg=Image_Processed('bjpImg2.jpg')
253
  plt.figure(figsize=(15,12))
254
  wordCloud(orgImg,bwImg,text_Party,maxWord=3000,colorGener=True,contCol='white',bckColor='black')
255
 
 
372
  plot4=gr.outputs.Image(label='Frequency Distribution')
373
  plot5=gr.outputs.Image(label='Dispersion Plot')
374
 
375
+ io=gr.Interface(fn=analysis, inputs=[filePdf,Search_txt], outputs=[text,mfw,plot1,plot2,plot3,plot4,plot5], title='Manifesto Analysis',examples=[['manifestos/Bjp_Manifesto_2019.pdf','modi'],['manifestos/AAP_Manifesto_2019.pdf','delhi'],['manifestos/Congress_Manifesto_2019.pdf','safety']])
376
  io.launch(debug=True,share=False)
377
  #,examples=[['./Bjp_Manifesto_2019.pdf','india'],['./AAP_Manifesto_2019.pdf',],['./Congress_Manifesto_2019.pdf',]]
378
  #allow_screenshot=False, allow_flagging="never",