Skip to content

Commit a402253

Browse files
kirklandsignfacebook-github-bot
authored andcommitted
Fix LLAMA app
Summary: Fix a UI thread issue causing crash. Differential Revision: D56447006
1 parent 9d2af4c commit a402253

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)