
3 changed files with 274 additions and 269 deletions
@ -1,29 +1,34 @@ |
|||
# 小说改写项目 |
|||
|
|||
基于unilm模型的生成式任务,使用keras框架,数据处理脚本在data_do文件夹下 |
|||
训练数据 train_cat_data_4.txt |
|||
# 改写项目 |
|||
|
|||
基于unilm模型以及t5的生成式任务,使用keras框架,数据处理脚本在data_do文件夹下 |
|||
训练数据 train_yy.txt |
|||
|
|||
## 训练 |
|||
加入了质量检测训练:bash train.sh |
|||
加入了质量检测训练:bash train_sim.sh |
|||
训练 t5: python task_seq2seq_t5.py |
|||
训练 simbert: python simbert_train.py |
|||
|
|||
## 预测 |
|||
|
|||
加入了质量检测 python predict_tf_sim.py |
|||
未加入质量检测 python predict_tf.py |
|||
simbert: python predict_sim.py |
|||
t5: python predict_t5.py |
|||
|
|||
## API serve |
|||
请求句子uuid服务启动方式:bash run_app_nohub_t5.sh |
|||
根据uuid查找改写结果服务启动方式:bash run_app_nohub_search_redis.sh |
|||
|
|||
目前的启动方式:bash run_app.sh |
|||
一键启动方式:bash run_app_gunicorn.sh |
|||
## 请求响应示例 |
|||
请求句子uuid: https://console-docs.apipost.cn/preview/e3717e390cbdb50e/f4479038c8015f34 |
|||
请求改写结果: https://console-docs.apipost.cn/preview/6b9de12817e8ef08/b158334d2c9534d2 |
|||
|
|||
## 请求示例 |
|||
requests.post( |
|||
"http://192.168.1.17:14000", |
|||
json={"texts": ["张三要爬上高位的,才能够翻云覆雨。"]}, |
|||
timeout=1000 |
|||
) |
|||
## 从yy数据生成训练数据 |
|||
python data_do/yy数据处理.py |
|||
python data_do/进一步处理降重数据.py |
|||
python data_do/yy训练数据处理.py |
|||
python 合并数据.py |
|||
python 筛选训练数据strsim.py |
|||
|
|||
## 测试11篇数据 |
|||
|
|||
|
|||
|
|||
## 响应 |
|||
{'probabilities': None, 'texts': ['张三要上了巅峰,他就可以为所欲为了。']} |
|||
## 测试数据是否有bug |
|||
python 测试10000篇数据.py |
Loading…
Reference in new issue