Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -23,6 +23,9 @@ def measure_readability(message,history):
|
|
23 |
cleantext = BeautifulSoup(html).text
|
24 |
#cleantext = BeautifulSoup(html,'lxml').text
|
25 |
text = re.sub(CLEANR,'', cleantext)
|
|
|
|
|
|
|
26 |
vline1 = "==== Content Info ==== " + os.linesep
|
27 |
vline2 = "Character Count "+str(textstat.char_count(text, ignore_spaces=True)) + os.linesep
|
28 |
vline3 = "Lexicon Count "+str(textstat.lexicon_count(text, removepunct=True)) + os.linesep
|
|
|
23 |
cleantext = BeautifulSoup(html).text
|
24 |
#cleantext = BeautifulSoup(html,'lxml').text
|
25 |
text = re.sub(CLEANR,'', cleantext)
|
26 |
+
else:
|
27 |
+
text = message
|
28 |
+
|
29 |
vline1 = "==== Content Info ==== " + os.linesep
|
30 |
vline2 = "Character Count "+str(textstat.char_count(text, ignore_spaces=True)) + os.linesep
|
31 |
vline3 = "Lexicon Count "+str(textstat.lexicon_count(text, removepunct=True)) + os.linesep
|