rbughao commited on
Commit
b3dd91d
1 Parent(s): 41ba0d5

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -0
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