Spaces:
Sleeping
Sleeping
Update backend/main.py
Browse files- backend/main.py +2 -2
backend/main.py
CHANGED
|
@@ -116,8 +116,8 @@ def extract_text_from_pdf(pdf_path: str) -> str:
|
|
| 116 |
text = text[chars // 10: chars // 10 + 15000]
|
| 117 |
|
| 118 |
words = text.split()
|
| 119 |
-
if len(words) >
|
| 120 |
-
text = " ".join(words[:
|
| 121 |
|
| 122 |
return text
|
| 123 |
|
|
|
|
| 116 |
text = text[chars // 10: chars // 10 + 15000]
|
| 117 |
|
| 118 |
words = text.split()
|
| 119 |
+
if len(words) > 1500:
|
| 120 |
+
text = " ".join(words[:1500])
|
| 121 |
|
| 122 |
return text
|
| 123 |
|