Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 97 |
-
|
| 98 |
-
|
| 99 |
-
-
|
| 100 |
-
-
|
| 101 |
-
-
|
| 102 |
-
-
|
|
|
|
|
|
|
|
|
|
| 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 |
|