rbughao commited on
Commit
6ad229a
1 Parent(s): b3dd91d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -41,16 +41,16 @@ def measure_readability(message,history):
41
  vline11 = "Dale-Chall Readability(1-5 = can be understood by 4th grader, 8-9 = can be undestood by 11th to 15th grade student) Score "+str(textstat.dale_chall_readability_score(text)) + os.linesep
42
  vline12 = "Gunning Fog Index (Years of formal education before a reader understand) is "+str(textstat.gunning_fog(text)) + os.linesep
43
  #print("Grade Level Comprehension is "+str(textstat.automated_readability_index(text)))
44
- vline13 = "Difficult Words "+str(textstat.difficult_words(text)) + os.linesep
45
  vline14 = "Reading Time is "+str(textstat.reading_time(text, ms_per_char=14.69))+" seconds"+ os.linesep
46
- answer = vline1+vline2+vline3+vline4+vline5+vline6+vline7+vline8+vline9+vline10+vline11+vline12+vline13+vline14
47
  #answer = "Flesch Reading Ease (90-100 = Easy to read, 0-29 = Very confusing to read) is "+str(textstat.flesch_reading_ease(text))
48
  return answer
49
 
50
 
51
 
52
- Conversing = gr.ChatInterface(measure_readability, chatbot=gr.Chatbot(height=400,label = "Enter Brand.com URL to evaluate"), retry_btn=None,theme=gr.themes.Monochrome(),
53
- title = 'Ecommerce Site Readability Tool', description = DEFAULT_SYSTEM_PROMPT ,undo_btn = None, clear_btn = None, css='footer {visibility: hidden}').launch()
54
  #"Algorithm for this site is based on Readability Wiki - https://en.wikipedia.org/wiki/Readability "
55
 
56
 
 
41
  vline11 = "Dale-Chall Readability(1-5 = can be understood by 4th grader, 8-9 = can be undestood by 11th to 15th grade student) Score "+str(textstat.dale_chall_readability_score(text)) + os.linesep
42
  vline12 = "Gunning Fog Index (Years of formal education before a reader understand) is "+str(textstat.gunning_fog(text)) + os.linesep
43
  #print("Grade Level Comprehension is "+str(textstat.automated_readability_index(text)))
44
+ #vline13 = "Difficult Words "+str(textstat.difficult_words(text)) + os.linesep
45
  vline14 = "Reading Time is "+str(textstat.reading_time(text, ms_per_char=14.69))+" seconds"+ os.linesep
46
+ answer = vline1+vline2+vline3+vline4+vline5+vline6+vline7+vline8+vline9+vline10+vline11+vline12+vline14
47
  #answer = "Flesch Reading Ease (90-100 = Easy to read, 0-29 = Very confusing to read) is "+str(textstat.flesch_reading_ease(text))
48
  return answer
49
 
50
 
51
 
52
+ Conversing = gr.ChatInterface(measure_readability, chatbot=gr.Chatbot(height=400,label = "Enter URL or String to evaluate"), retry_btn=None,theme=gr.themes.Monochrome(),
53
+ title = 'Ecommerce Content Readability Tool', description = DEFAULT_SYSTEM_PROMPT ,undo_btn = None, clear_btn = None, css='footer {visibility: hidden}').launch()
54
  #"Algorithm for this site is based on Readability Wiki - https://en.wikipedia.org/wiki/Readability "
55
 
56