From 2653279e306ea0015decd05be92b1c350080868d Mon Sep 17 00:00:00 2001 From: jason Date: Wed, 15 May 2019 11:31:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 16 ++++++++++++++++ app/build.gradle | 3 ++- build.gradle | 2 +- 3 files changed, 19 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 597956fe..0c64b052 100644 --- a/README.md +++ b/README.md @@ -4,6 +4,22 @@ ### 色情图片离线识别,基于TensorFlow实现。识别只需200ms,可断网测试,成功率100%,调用只要一行代码,从雅虎的开源项目open_nsfw_python移植,tflite(6M)为训练好的模型,可用于iOS平台 +### 使用 +- Add it in your root build.gradle at the end of repositories: +``` + allprojects { + repositories { + ... + maven { url 'https://jitpack.io' } + } + } +``` +- Add the dependency +``` + dependencies { + implementation 'com.github.User:Repo:Tag' + } +``` ``` val nsfwBean = NsfwHelper.getInstance(this, true, 1).scanBitmapSyn(bitmap) nsfwBean?.sfw ... diff --git a/app/build.gradle b/app/build.gradle index 5116e621..c3159d66 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -34,5 +34,6 @@ dependencies { testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.2' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2' - implementation project(path: ':nsfw') +// implementation project(path: ':nsfw') + implementation 'com.github.devzwy:open_nsfw_android:1.1' } diff --git a/build.gradle b/build.gradle index 3b61f16d..8538a6be 100644 --- a/build.gradle +++ b/build.gradle @@ -19,7 +19,7 @@ allprojects { repositories { google() jcenter() - + maven { url 'https://jitpack.io' } } }