Browse Source

第一个增强版上线

master
majiahui@haimaqingfan.com 1 year ago
parent
commit
3170b53327
  1. 13
      flask_drop_rewrite_request.py
  2. 2
      redis_check_uuid_mistral.py

13
flask_drop_rewrite_request.py

@ -308,9 +308,16 @@ def post_sentence_ulit(sentence, text_info):
if "改写后:" in sentence:
sentence_lable_index = sentence.index("改写后:")
sentence = sentence[sentence_lable_index + 4:]
if sentence[-1] == "\n":
sentence = sentence[:-1]
# if sentence[-1] == "\n":
# sentence = sentence[:-1]
sentence = sentence.strip("\n")
if sentence[-1] != text_info[0][-1]:
if is_chinese(text_info[0][-1]) == True:
if is_chinese(sentence[-1]) != True:
sentence = sentence[:-1]
else:
sentence = sentence[:-1] + text_info[0][-1]
else:
sentence = text_info[0]
@ -560,4 +567,4 @@ if __name__ == "__main__":
'%(asctime)s - %(pathname)s[line:%(lineno)d] - %(levelname)s: %(message)s'
# 日志格式
)
app.run(host="0.0.0.0", port=14008, threaded=True, debug=False)
app.run(host="0.0.0.0", port=14002, threaded=True, debug=False)

2
redis_check_uuid_mistral.py

@ -89,4 +89,4 @@ def handle_query():
if __name__ == "__main__":
app.run(debug=False, host='0.0.0.0', port=14009)
app.run(debug=False, host='0.0.0.0', port=14003)

Loading…
Cancel
Save