ikraamkb commited on
Commit
30a8162
·
verified ·
1 Parent(s): a0e7ad2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -0
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)