Skip to content

Commit f41e1ed

Browse files
authoredSep 19, 2024··
Updated Phi-3 Android App using Java API (#449)
* create phi-3 vision folder * phi-3 android studio * updated with java api * remove simpleGenAI * prompt template fix * update downloads * change colors and update model download * remove phi-3 vision project * fix light purple color * Fixes for Edward's comments * brat * brat pt2 * emulator abi support * update comment * address feedback
1 parent 77989cf commit f41e1ed

25 files changed

+247
-704
lines changed
 

‎.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -437,3 +437,5 @@ config.json
437437
.ipynb_aml_checkpoints
438438
*.ipynb.amltmp
439439

440+
## Android Studio IDE files
441+
.idea/

‎mobile/examples/phi-3/android/app/build.gradle.kts

+5-11
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,6 @@ android {
1414
versionName = "1.0"
1515

1616
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
17-
externalNativeBuild {
18-
cmake {
19-
cppFlags += "-std=c++17"
20-
}
21-
}
2217

2318
ndk {
2419
//noinspection ChromeOsAbiSupport
@@ -41,12 +36,6 @@ android {
4136
targetCompatibility = JavaVersion.VERSION_1_8
4237
}
4338

44-
externalNativeBuild {
45-
cmake {
46-
path = file("src/main/cpp/CMakeLists.txt")
47-
version = "3.22.1"
48-
}
49-
}
5039
buildFeatures {
5140
viewBinding = true
5241
}
@@ -60,4 +49,9 @@ dependencies {
6049
testImplementation("junit:junit:4.13.2")
6150
androidTestImplementation("androidx.test.ext:junit:1.1.5")
6251
androidTestImplementation("androidx.test.espresso:espresso-core:3.5.1")
52+
53+
// ONNX Runtime with GenAI
54+
implementation("com.microsoft.onnxruntime:onnxruntime-android:latest.release")
55+
implementation(files("libs/onnxruntime-genai-android-0.4.0-dev.aar"))
56+
6357
}
Binary file not shown.

‎mobile/examples/phi-3/android/app/src/main/cpp/CMakeLists.txt

-43
This file was deleted.

‎mobile/examples/phi-3/android/app/src/main/cpp/README.md

-5
This file was deleted.

‎mobile/examples/phi-3/android/app/src/main/cpp/native-lib.cpp

-181
This file was deleted.

0 commit comments

Comments
 (0)
Please sign in to comment.