Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -47,7 +47,7 @@ nltk.download('words')
|
|
47 |
#raw_party =parser.from_file(parsed_text)
|
48 |
# raw_party = raw_party['content'],cache_examples=True
|
49 |
# return clean(raw_party)
|
50 |
-
|
51 |
|
52 |
def Parsing(parsed_text):
|
53 |
parsed_text=parsed_text.name
|
@@ -379,8 +379,7 @@ def analysis(Manifesto,Search):
|
|
379 |
buf.seek(0)
|
380 |
img2 = Image.open(buf)
|
381 |
plt.clf()
|
382 |
-
|
383 |
-
|
384 |
img3 = word_cloud_generator(Manifesto.name,text_Party)
|
385 |
|
386 |
fdist_Party=fDistance(text_Party)
|
@@ -389,7 +388,7 @@ def analysis(Manifesto,Search):
|
|
389 |
#concordance(text_Party,Search)
|
390 |
searChRes=get_all_phases_containing_tar_wrd(Search,text_Party)
|
391 |
searChRes=searChRes.replace(Search,"\u0332".join(Search))
|
392 |
-
|
393 |
return searChRes,fdist_Party,img1,img2,img3,img4,img5
|
394 |
|
395 |
|
|
|
47 |
#raw_party =parser.from_file(parsed_text)
|
48 |
# raw_party = raw_party['content'],cache_examples=True
|
49 |
# return clean(raw_party)
|
50 |
+
|
51 |
|
52 |
def Parsing(parsed_text):
|
53 |
parsed_text=parsed_text.name
|
|
|
379 |
buf.seek(0)
|
380 |
img2 = Image.open(buf)
|
381 |
plt.clf()
|
382 |
+
|
|
|
383 |
img3 = word_cloud_generator(Manifesto.name,text_Party)
|
384 |
|
385 |
fdist_Party=fDistance(text_Party)
|
|
|
388 |
#concordance(text_Party,Search)
|
389 |
searChRes=get_all_phases_containing_tar_wrd(Search,text_Party)
|
390 |
searChRes=searChRes.replace(Search,"\u0332".join(Search))
|
391 |
+
plt.close('all')
|
392 |
return searChRes,fdist_Party,img1,img2,img3,img4,img5
|
393 |
|
394 |
|