Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -192,7 +192,6 @@ def DispersionPlot(textParty):
|
|
| 192 |
|
| 193 |
plt.axis('off')
|
| 194 |
plt.title('Dispersion Plot')
|
| 195 |
-
plt.figure(figsize=(4,3))
|
| 196 |
moby.dispersion_plot(word_Lst)
|
| 197 |
plt.plot(color="#EF6D6D")
|
| 198 |
plt.tight_layout()
|
|
@@ -379,6 +378,7 @@ def analysis(Manifesto,Search):
|
|
| 379 |
buf.seek(0)
|
| 380 |
img2 = Image.open(buf)
|
| 381 |
plt.clf()
|
|
|
|
| 382 |
|
| 383 |
img3 = word_cloud_generator(Manifesto.name,text_Party)
|
| 384 |
|
|
@@ -403,6 +403,7 @@ plot5=gr.outputs.Image(label='Dispersion Plot')
|
|
| 403 |
|
| 404 |
io=gr.Interface(fn=analysis, inputs=[filePdf,Search_txt], outputs=[text,mfw,plot1,plot2,plot3,plot4,plot5], title='Manifesto Analysis',examples=[['Example/Bjp_Manifesto_2019.pdf','modi'],['Example/AAP_Manifesto_2019.pdf','government'],['Example/Congress_Manifesto_2019.pdf','safety']],theme='peach')
|
| 405 |
io.launch(debug=True,share=False)
|
|
|
|
| 406 |
#,examples=[['./Bjp_Manifesto_2019.pdf','india'],['./AAP_Manifesto_2019.pdf',],['./Congress_Manifesto_2019.pdf',]]
|
| 407 |
#allow_screenshot=False, allow_flagging="never",
|
| 408 |
|
|
|
|
| 192 |
|
| 193 |
plt.axis('off')
|
| 194 |
plt.title('Dispersion Plot')
|
|
|
|
| 195 |
moby.dispersion_plot(word_Lst)
|
| 196 |
plt.plot(color="#EF6D6D")
|
| 197 |
plt.tight_layout()
|
|
|
|
| 378 |
buf.seek(0)
|
| 379 |
img2 = Image.open(buf)
|
| 380 |
plt.clf()
|
| 381 |
+
plt.close()
|
| 382 |
|
| 383 |
img3 = word_cloud_generator(Manifesto.name,text_Party)
|
| 384 |
|
|
|
|
| 403 |
|
| 404 |
io=gr.Interface(fn=analysis, inputs=[filePdf,Search_txt], outputs=[text,mfw,plot1,plot2,plot3,plot4,plot5], title='Manifesto Analysis',examples=[['Example/Bjp_Manifesto_2019.pdf','modi'],['Example/AAP_Manifesto_2019.pdf','government'],['Example/Congress_Manifesto_2019.pdf','safety']],theme='peach')
|
| 405 |
io.launch(debug=True,share=False)
|
| 406 |
+
plt.close('all')
|
| 407 |
#,examples=[['./Bjp_Manifesto_2019.pdf','india'],['./AAP_Manifesto_2019.pdf',],['./Congress_Manifesto_2019.pdf',]]
|
| 408 |
#allow_screenshot=False, allow_flagging="never",
|
| 409 |
|