Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -42,7 +42,7 @@ Rewrite the following passage so it fits about {target_lexile} Lexile.
|
|
| 42 |
return resp.choices[0].message.content.strip()
|
| 43 |
|
| 44 |
|
| 45 |
-
|
| 46 |
w = text.split()
|
| 47 |
pages = [" ".join(w[i:i+words]) for i in range(0, len(w), words)]
|
| 48 |
return pages if pages else [text]
|
|
|
|
| 42 |
return resp.choices[0].message.content.strip()
|
| 43 |
|
| 44 |
|
| 45 |
+
def split_pages(text, words=120): #ページ分割
|
| 46 |
w = text.split()
|
| 47 |
pages = [" ".join(w[i:i+words]) for i in range(0, len(w), words)]
|
| 48 |
return pages if pages else [text]
|