Toya0421 commited on
Commit
47b3874
·
verified ·
1 Parent(s): 10b5a32

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -7
app.py CHANGED
@@ -93,13 +93,16 @@ def build_prompt(text: str, target_level: int, prompt_mode: str) -> str:
93
 
94
  if prompt_mode == "legacy":
95
  return f"""
96
- Rewrite the following passage so it fits about {target_flesch} Flesch Reading Ease Score
97
- - Extract only the portions of the text that should be read as the main body,
98
- excluding the title, author name, source information, chapter number, annotations, and footers.
99
- - When outputting, make sure sections divided by chapters, etc., are clearly distinguishable by leaving a blank line between them.
100
- - Preserve the original meaning faithfully.
101
- - Do not add new information or remove essential information.
102
- - Output only the rewritten passage. Do not include explanations.
 
 
 
103
  {text}
104
  """
105
 
 
93
 
94
  if prompt_mode == "legacy":
95
  return f"""
96
+ Rewrite the following text to achieve a Flesch Readability Score of {target_flesch}.
97
+
98
+ Requirements:
99
+ - Extract only the main text, excluding titles, author names, source information, chapter numbers, annotations, footers, etc.
100
+ - Clearly separate sections such as chapters by inserting blank lines between them.
101
+ - Maintain the original meaning faithfully; do not add or remove important information.
102
+ - Rewrite into clear, modern, and natural English suitable for learners at the target level.
103
+ Avoid archaic expressions, inverted syntax, and literary expressions typical of old picture books.
104
+ Use simple, modern sentence structures and word order.
105
+ - Output only the rewritten text. Do not include explanatory notes or other additional text.
106
  {text}
107
  """
108