JohnSmith9982 commited on
Commit
aa49d7e
1 Parent(s): f95d65a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -63,12 +63,12 @@ def parse_text(text):
63
  line = line.replace(" ", " ")
64
  line = line.replace("*", "*")
65
  line = line.replace("_", "_")
66
- line = line.replace("{", "{")
67
- line = line.replace("}", "}")
68
- line = line.replace("[", "[")
69
- line = line.replace("]", "]")
70
- line = line.replace("|", "|")
71
  line = line.replace("-", "-")
 
 
 
 
72
  lines[i] = "<br>"+line
73
  text = "".join(lines)
74
  return text
@@ -340,6 +340,6 @@ if dockerflag:
340
  demo.queue().launch(server_name="0.0.0.0", server_port=7860, share=False)
341
  #if not running in Docker
342
  else:
343
- demo.queue().launch(server_name = "0.0.0.0", share=False) # 改为 share=True 可以创建公开分享链接
344
  #demo.queue().launch(server_name="0.0.0.0", server_port=7860, share=False) # 可自定义端口
345
  #demo.queue().launch(server_name="0.0.0.0", server_port=7860,auth=("在这里填写用户名", "在这里填写密码")) # 可设置用户名与密码
 
63
  line = line.replace(" ", "&nbsp;")
64
  line = line.replace("*", "&ast;")
65
  line = line.replace("_", "&lowbar;")
66
+ line = line.replace("#", "&#35;")
 
 
 
 
67
  line = line.replace("-", "&#45;")
68
+ line = line.replace(".", "&#46;")
69
+ line = line.replace("!", "&#33;")
70
+ line = line.replace("(", "&#40;")
71
+ line = line.replace(")", "&#41;")
72
  lines[i] = "<br>"+line
73
  text = "".join(lines)
74
  return text
 
340
  demo.queue().launch(server_name="0.0.0.0", server_port=7860, share=False)
341
  #if not running in Docker
342
  else:
343
+ demo.queue().launch(share=False) # 改为 share=True 可以创建公开分享链接
344
  #demo.queue().launch(server_name="0.0.0.0", server_port=7860, share=False) # 可自定义端口
345
  #demo.queue().launch(server_name="0.0.0.0", server_port=7860,auth=("在这里填写用户名", "在这里填写密码")) # 可设置用户名与密码