HakshaySundar commited on
Commit
9c37f19
1 Parent(s): 9d6764e

Update app.py

Browse files

Trying to clean up.

Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
  from text_converter import generate_similar_sentence
3
  from text_converter import user_input_readability_level
 
4
 
5
  APP_DESCRIPTION = '''# Reading Level Converter
6
  <div id="content_align">Convert any text to a specified reading level while retaining the core text meaning</div>'''
@@ -10,6 +11,7 @@ MAX_ITER = 5
10
  SYSTEM_PROMPT = "You are a writing assistant. You help convert complex texts to simpler texts while maintaining the core meaning of the text."
11
 
12
  # Dictionary mapping grade levels to reading ease scores
 
13
  reading_levels = {
14
  "5th Grade (90-100)": (90, 100),
15
  "6th Grade (80-90)": (80, 90),
@@ -19,6 +21,7 @@ reading_levels = {
19
  "College (30-50)": (30, 50),
20
  "College Graduate + Professionals (0-30)": (0, 30)
21
  }
 
22
 
23
  def convert_text(input_text, grade_level, input_reading_score):
24
  min_level, max_level = reading_levels[grade_level]
 
1
  import gradio as gr
2
  from text_converter import generate_similar_sentence
3
  from text_converter import user_input_readability_level
4
+ from text_converter import reading_levels
5
 
6
  APP_DESCRIPTION = '''# Reading Level Converter
7
  <div id="content_align">Convert any text to a specified reading level while retaining the core text meaning</div>'''
 
11
  SYSTEM_PROMPT = "You are a writing assistant. You help convert complex texts to simpler texts while maintaining the core meaning of the text."
12
 
13
  # Dictionary mapping grade levels to reading ease scores
14
+ """
15
  reading_levels = {
16
  "5th Grade (90-100)": (90, 100),
17
  "6th Grade (80-90)": (80, 90),
 
21
  "College (30-50)": (30, 50),
22
  "College Graduate + Professionals (0-30)": (0, 30)
23
  }
24
+ """
25
 
26
  def convert_text(input_text, grade_level, input_reading_score):
27
  min_level, max_level = reading_levels[grade_level]