Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -215,6 +215,8 @@ def process_input(text_input, file):
|
|
| 215 |
|
| 216 |
if text_input:
|
| 217 |
content += text_input + "\n"
|
|
|
|
|
|
|
| 218 |
|
| 219 |
elif file:
|
| 220 |
# Nếu file là bytes, chuyển đổi thành đối tượng BytesIO
|
|
|
|
| 215 |
|
| 216 |
if text_input:
|
| 217 |
content += text_input + "\n"
|
| 218 |
+
parts = re.split(r'[.?!]\s*|\n+', content)
|
| 219 |
+
comments = [p.strip() for p in parts if p and p.strip()]
|
| 220 |
|
| 221 |
elif file:
|
| 222 |
# Nếu file là bytes, chuyển đổi thành đối tượng BytesIO
|