Ali2206 commited on
Commit
47356aa
·
verified ·
1 Parent(s): 1c5bd8e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -35,7 +35,7 @@ def file_hash(path: str) -> str:
35
  return hashlib.md5(f.read()).hexdigest()
36
 
37
  def clean_response(text: str) -> str:
38
- text = text.encode("utf-8", "ignore").decode("utf-8")
39
  text = re.sub(r"\[.*?\]|\bNone\b", "", text, flags=re.DOTALL)
40
  text = re.sub(r"\n{3,}", "\n\n", text)
41
  text = re.sub(r"[^\n#\-\*\w\s\.,:\(\)]+", "", text)
@@ -151,5 +151,5 @@ if __name__ == "__main__":
151
  server_port=7860,
152
  show_error=True,
153
  allowed_paths=[report_dir],
154
- share=False
155
- )
 
35
  return hashlib.md5(f.read()).hexdigest()
36
 
37
  def clean_response(text: str) -> str:
38
+ text = text.encode("utf-16", "surrogatepass").decode("utf-16", "ignore")
39
  text = re.sub(r"\[.*?\]|\bNone\b", "", text, flags=re.DOTALL)
40
  text = re.sub(r"\n{3,}", "\n\n", text)
41
  text = re.sub(r"[^\n#\-\*\w\s\.,:\(\)]+", "", text)
 
151
  server_port=7860,
152
  show_error=True,
153
  allowed_paths=[report_dir],
154
+ share=True
155
+ )