Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -36,6 +36,7 @@ executor = ThreadPoolExecutor()
|
|
36 |
summary_cache = {}
|
37 |
|
38 |
def clean_text(text: str) -> str:
|
|
|
39 |
text = re.sub(r'\s+', ' ', text)
|
40 |
text = re.sub(r'\u2022\s*|\d\.\s+', '', text)
|
41 |
text = re.sub(r'\[.*?\]|\(.*?\)', '', text)
|
|
|
36 |
summary_cache = {}
|
37 |
|
38 |
def clean_text(text: str) -> str:
|
39 |
+
text = text.encode("utf-8", errors="ignore").decode("utf-8")
|
40 |
text = re.sub(r'\s+', ' ', text)
|
41 |
text = re.sub(r'\u2022\s*|\d\.\s+', '', text)
|
42 |
text = re.sub(r'\[.*?\]|\(.*?\)', '', text)
|