Skip to content

Commit c07cfc9

Browse files
authored
Fix LLAMA app (#3228) (#3283)
Summary: Pull Request resolved: #3228 Fix a UI thread issue causing crash. Reviewed By: cccclai Differential Revision: D56447006 fbshipit-source-id: 02eff27d4b4cd108c95b664d04679d4f92aaf5db (cherry picked from commit 4389442)
1 parent b53c97d commit c07cfc9

File tree

1 file changed

+1
-1
lines changed
  • examples/demo-apps/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo

1 file changed

+1
-1
lines changed

examples/demo-apps/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/MainActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ private void setLocalModel(String modelPath, String tokenizerPath) {
7979
if (loadResult != 0) {
8080
AlertDialog.Builder builder = new AlertDialog.Builder(this);
8181
builder.setTitle("Load failed: " + loadResult);
82-
AlertDialog alert = builder.create();
8382
runOnUiThread(
8483
() -> {
84+
AlertDialog alert = builder.create();
8585
alert.show();
8686
});
8787
}

0 commit comments

Comments
 (0)