Sa-m commited on
Commit
8d57452
1 Parent(s): 8533bbc

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -139,7 +139,7 @@ def get_all_phases_containing_tar_wrd(target_word, tar_passage, left_margin = 10
139
  ## join the sentences for each of the target phrase and return it
140
  result = [''.join([x.replace("Y","")+' ' for x in con_sub]) for con_sub in concordance_txt][:-1]
141
  result=result[:numLins+1]
142
- res='\n\n*'.join(result)
143
  return res
144
 
145
 
@@ -400,7 +400,7 @@ plot3=gr.outputs.Image(label='Word Cloud')
400
  plot4=gr.outputs.Image(label='Frequency Distribution')
401
  plot5=gr.outputs.Image(label='Dispersion Plot')
402
 
403
- 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']],theme='peach')
404
  io.launch(debug=True,share=False)
405
  #,examples=[['./Bjp_Manifesto_2019.pdf','india'],['./AAP_Manifesto_2019.pdf',],['./Congress_Manifesto_2019.pdf',]]
406
  #allow_screenshot=False, allow_flagging="never",
 
139
  ## join the sentences for each of the target phrase and return it
140
  result = [''.join([x.replace("Y","")+' ' for x in con_sub]) for con_sub in concordance_txt][:-1]
141
  result=result[:numLins+1]
142
+ res='*\n\n'.join(result)
143
  return res
144
 
145
 
 
400
  plot4=gr.outputs.Image(label='Frequency Distribution')
401
  plot5=gr.outputs.Image(label='Dispersion Plot')
402
 
403
+ 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','government'],['manifestos/Congress_Manifesto_2019.pdf','safety']],theme='peach')
404
  io.launch(debug=True,share=False)
405
  #,examples=[['./Bjp_Manifesto_2019.pdf','india'],['./AAP_Manifesto_2019.pdf',],['./Congress_Manifesto_2019.pdf',]]
406
  #allow_screenshot=False, allow_flagging="never",