未验证 提交 d430fc35 编写于 作者: jm_12138's avatar jm_12138 提交者: GitHub

update porn_detection_lstm (#2104)

上级 1b5a1e26
...@@ -156,10 +156,10 @@ ...@@ -156,10 +156,10 @@
大幅提升预测性能,同时简化接口使用 大幅提升预测性能,同时简化接口使用
* 1.1.1 * 1.2.0
移除 fluid api 移除 Fluid API
- ```shell - ```shell
$ hub install porn_detection_lstm==1.1.1 $ hub install porn_detection_lstm==1.2.0
``` ```
# -*- coding:utf-8 -*-
from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
import math import math
import os import os
import paddle
import six
from porn_detection_lstm.processor import load_vocab
from porn_detection_lstm.processor import postprocess
from porn_detection_lstm.processor import preprocess
import paddlehub as hub import paddlehub as hub
from paddlehub.common.paddle_helper import get_variable_info from .processor import load_vocab
from .processor import postprocess
from .processor import preprocess
from paddlehub.compat.task import tokenization
from paddlehub.module.module import moduleinfo from paddlehub.module.module import moduleinfo
from paddlehub.module.module import serving from paddlehub.module.module import serving
from paddlehub.reader import tokenization
@moduleinfo(name="porn_detection_lstm", @moduleinfo(name="porn_detection_lstm",
version="1.1.1", version="1.2.0",
summary="Baidu's open-source Porn Detection Model.", summary="Baidu's open-source Porn Detection Model.",
author="baidu-nlp", author="baidu-nlp",
author_email="", author_email="",
type="nlp/sentiment_analysis") type="nlp/sentiment_analysis")
class PornDetectionLSTM(hub.NLPPredictionModule): class PornDetectionLSTM(hub.NLPPredictionModule):
def _initialize(self): def __init__(self):
""" """
initialize with the necessary elements initialize with the necessary elements
""" """
......
# -*- coding: utf-8 -*-
import io import io
import numpy as np import numpy as np
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册