You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
# 小说改写项目
|
|
|
|
|
|
|
|
基于unilm模型的生成式任务,使用keras框架,数据处理脚本在data_do文件夹下
|
|
|
|
训练数据 train_cat_data_4.txt
|
|
|
|
|
|
|
|
## 训练
|
|
|
|
加入了质量检测训练:bash train.sh
|
|
|
|
加入了质量检测训练:bash train_sim.sh
|
|
|
|
|
|
|
|
## 预测
|
|
|
|
|
|
|
|
加入了质量检测 python predict_tf_sim.py
|
|
|
|
未加入质量检测 python predict_tf.py
|
|
|
|
|
|
|
|
## API serve
|
|
|
|
|
|
|
|
目前的启动方式:bash run_app.sh
|
|
|
|
一键启动方式:bash run_app_gunicorn.sh
|
|
|
|
|
|
|
|
## 请求示例
|
|
|
|
requests.post(
|
|
|
|
"http://192.168.1.17:14000",
|
|
|
|
json={"texts": ["张三要爬上高位的,才能够翻云覆雨。"]},
|
|
|
|
timeout=1000
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
|
|
## 响应
|
|
|
|
{'probabilities': None, 'texts': ['张三要上了巅峰,他就可以为所欲为了。']}
|