Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -182,6 +182,10 @@ url="https://drive.google.com/uc?id=1BLCiy_BWilfVdrUH8kbO-44DJevwO5CG&export=dow
|
|
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)
|
187 |
text_Party=clean_text(raw_party)
|
@@ -236,7 +240,7 @@ plot2=gr.outputs.Image(label='Word Cloud')
|
|
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 |
|
|
|
182 |
path_input = "./Aap_Manifesto_2019.pdf"
|
183 |
urllib.request.urlretrieve(url, filename=path_input)
|
184 |
|
185 |
+
url="https://manifesto.inc.in/pdf/english.pdf"
|
186 |
+
path_input = "/Congress_Manifesto_2019.pdf"
|
187 |
+
urllib.request.urlretrieve(url, filename=path_input)
|
188 |
+
|
189 |
def analysis(Manifesto,Search):
|
190 |
raw_party = Parsing(Manifesto)
|
191 |
text_Party=clean_text(raw_party)
|
|
|
240 |
plot3=gr.outputs.Image(label='Subjectivity')
|
241 |
plot4=gr.outputs.Image(label='Frequency Distribution')
|
242 |
|
243 |
+
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',],['/Congress_Manifesto_2019.pdf',]])
|
244 |
io.launch(debug=False,share=True)
|
245 |
|
246 |
|