Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -178,6 +178,9 @@ url = "http://library.bjp.org/jspui/bitstream/123456789/2988/1/BJP-Election-engl
|
|
178 |
path_input = "./Bjp_Manifesto_2019.pdf'"
|
179 |
urllib.request.urlretrieve(url, filename=path_input)
|
180 |
|
|
|
|
|
|
|
181 |
|
182 |
def analysis(Manifesto,Search):
|
183 |
raw_party = Parsing(Manifesto)
|
@@ -233,7 +236,7 @@ plot2=gr.outputs.Image(label='Word Cloud')
|
|
233 |
plot3=gr.outputs.Image(label='Subjectivity')
|
234 |
plot4=gr.outputs.Image(label='Frequency Distribution')
|
235 |
|
236 |
-
io=gr.Interface(fn=analysis, inputs=[filePdf,Search_txt], outputs=[text,mfw,plot4,plot1,plot2,plot3], title='Manifesto Analysis',examples=[['./Bjp_Manifesto_2019.pdf',]])
|
237 |
io.launch(debug=False,share=True)
|
238 |
|
239 |
|
|
|
178 |
path_input = "./Bjp_Manifesto_2019.pdf'"
|
179 |
urllib.request.urlretrieve(url, filename=path_input)
|
180 |
|
181 |
+
url="https://github.com/samarth70/Manifesto-Explainer/blob/main/AAP_Manifesto_2019.pdf"
|
182 |
+
path_input = "./Aap_Manifesto_2019.pdf"
|
183 |
+
urllib.request.urlretrieve(url, filename=path_input)
|
184 |
|
185 |
def analysis(Manifesto,Search):
|
186 |
raw_party = Parsing(Manifesto)
|
|
|
236 |
plot3=gr.outputs.Image(label='Subjectivity')
|
237 |
plot4=gr.outputs.Image(label='Frequency Distribution')
|
238 |
|
239 |
+
io=gr.Interface(fn=analysis, inputs=[filePdf,Search_txt], outputs=[text,mfw,plot4,plot1,plot2,plot3], title='Manifesto Analysis',examples=[['./Bjp_Manifesto_2019.pdf','india'],['./Aap_Manifesto_2019.pdf',]])
|
240 |
io.launch(debug=False,share=True)
|
241 |
|
242 |
|