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' } } }