Sa-m commited on
Commit
76ec819
1 Parent(s): 2536bd9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -197,7 +197,7 @@ def getAnalysis(score):
197
  return 'Neutral'
198
  else:
199
  return 'Positive'
200
-
201
  url = "http://library.bjp.org/jspui/bitstream/123456789/2988/1/BJP-Election-english-2019.pdf"
202
  path_input = "./Bjp_Manifesto_2019.pdf"
203
  urllib.request.urlretrieve(url, filename=path_input)
@@ -209,7 +209,7 @@ urllib.request.urlretrieve(url, filename=path_input)
209
  url="https://drive.google.com/uc?id=1HVZvTtYntl0YKLnE0cwu0CvAIRhXOv60&export=download"
210
  path_input = "./Congress_Manifesto_2019.pdf"
211
  urllib.request.urlretrieve(url, filename=path_input)
212
-
213
  def analysis(Manifesto,Search):
214
  raw_party = Parsing(Manifesto)
215
  text_Party=clean_text(raw_party)
@@ -272,8 +272,8 @@ plot3=gr.outputs.Image(label='Word Cloud')
272
  plot4=gr.outputs.Image(label='Frequency Distribution')
273
  plot5=gr.outputs.Image(label='Dispersion Plot')
274
 
275
- io=gr.Interface(fn=analysis, inputs=[filePdf,Search_txt], outputs=[text,mfw,plot1,plot2,plot3,plot4,plot5], title='Manifesto Analysis',examples=[['./Bjp_Manifesto_2019.pdf','modi'],['./Aap_Manifesto_2019.pdf','delhi'],['./Congress_Manifesto_2019.pdf','safety']])
276
- io.launch(debug=True,share=True)
277
  #,examples=[['./Bjp_Manifesto_2019.pdf','india'],['./Aap_Manifesto_2019.pdf',],['./Congress_Manifesto_2019.pdf',]]
278
  #allow_screenshot=False, allow_flagging="never",
279
 
 
197
  return 'Neutral'
198
  else:
199
  return 'Positive'
200
+ '''
201
  url = "http://library.bjp.org/jspui/bitstream/123456789/2988/1/BJP-Election-english-2019.pdf"
202
  path_input = "./Bjp_Manifesto_2019.pdf"
203
  urllib.request.urlretrieve(url, filename=path_input)
 
209
  url="https://drive.google.com/uc?id=1HVZvTtYntl0YKLnE0cwu0CvAIRhXOv60&export=download"
210
  path_input = "./Congress_Manifesto_2019.pdf"
211
  urllib.request.urlretrieve(url, filename=path_input)
212
+ '''
213
  def analysis(Manifesto,Search):
214
  raw_party = Parsing(Manifesto)
215
  text_Party=clean_text(raw_party)
 
272
  plot4=gr.outputs.Image(label='Frequency Distribution')
273
  plot5=gr.outputs.Image(label='Dispersion Plot')
274
 
275
+ io=gr.Interface(fn=analysis, inputs=[filePdf,Search_txt], outputs=[text,mfw,plot1,plot2,plot3,plot4,plot5], title='Manifesto Analysis',examples=[['Content/Bjp_Manifesto_2019.pdf','modi'],['Aap_Manifesto_2019.pdf','delhi'],['Content/Congress_Manifesto_2019.pdf','safety']],interpretation="shap")
276
+ io.launch(debug=True)
277
  #,examples=[['./Bjp_Manifesto_2019.pdf','india'],['./Aap_Manifesto_2019.pdf',],['./Congress_Manifesto_2019.pdf',]]
278
  #allow_screenshot=False, allow_flagging="never",
279