Merge remote-tracking branch 'origin/main'

This commit is contained in:
weiweiw 2025-03-03 08:04:33 +08:00
commit 7d427ba7ba
6 changed files with 19335 additions and 9 deletions

View File

@ -85,7 +85,7 @@ def init_env():
# 初始化模型
print("初始模型加载")
# embedding = BCE_EMB(EMBEDDING_MODEL_PATH)
EMBEDDING_MODEL_PATH = "/home/workplace/models/m3e-base"
EMBEDDING_MODEL_PATH = "/mnt/d/weiweiwang/intention/models/m3e-base"
embedding = M3E_EMB(EMBEDDING_MODEL_PATH)
know_pass = KNOW_PASS(embedding)
return know_pass
@ -98,7 +98,7 @@ if __name__ == "__main__":
# 默认环境
know_pass = init_env()
uvicorn.run(app, host='0.0.0.0', port=6006)
uvicorn.run(app, host='0.0.0.0', port=6007)
except Exception as e:
print(f"API启动失败\n报错:\n{e}")

View File

@ -2,7 +2,7 @@ python train.py \
--do_train \
--do_eval \
--do_export \
--model_name_or_path /home/workplace/models/ernie-3.0-tiny-base-v2-zh \
--model_name_or_path /mnt/d/weiweiwang/intention/models/ernie-3.0-tiny-base-v2-zh \
--output_dir checkpoint \
--device gpu:0 \
--train_path ./data/train.txt \

View File

@ -83,10 +83,10 @@ parser.add_argument("--schema_lang", choices=["ch", "en"], default="ch", help="S
args = parser.parse_args()
model_names = {
"intent_token": "/home/workplace/models/zero_int",
"intent_model": "/home/workplace/models/zero_int/model",
"uie_token":"/home/workplace/models/zero_uie",
"uie_model":"/home/workplace/models/zero_uie/model",
"intent_token": "/mnt/d/weiweiwang/intention/models/zero_int",
"intent_model": "/mnt/d/weiweiwang/intention/models/zero_int/model",
"uie_token":"/mnt/d/weiweiwang/intention/models/zero_uie",
"uie_model":"/mnt/d/weiweiwang/intention/models/zero_uie/model",
}
label_names = {
"int" : "./int/data/label.txt",
@ -580,7 +580,7 @@ if __name__ == "__main__":
int_model,int_tokenizer = get_model(model_names['intent_token'],model_names['intent_model'])
uie_model,uie_tokenizer = get_model(model_names['uie_token'],model_names['uie_model'])
host = "0.0.0.0"
port = 8072
port = 18074
api_start(host,port)

View File

@ -2,7 +2,7 @@ import requests
class Similar():
def __init__(self):
self.url = 'http://127.0.0.1:6006'
self.url = 'http://127.0.0.1:6007'
def post(self,url,json_p):
headers = {

17279
uie/data/dev.txt Normal file

File diff suppressed because it is too large Load Diff

2047
uie/data/train.txt Normal file

File diff suppressed because it is too large Load Diff