Skip to content

Commit

Permalink
Fix LLAMA app (#3228)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
kirklandsign committed Apr 24, 2024
1 parent 2a1ae4f commit 3b5a01c
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ private void setLocalModel(String modelPath, String tokenizerPath) {
if (loadResult != 0) {
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Load failed: " + loadResult);
AlertDialog alert = builder.create();
runOnUiThread(
() -> {
AlertDialog alert = builder.create();
alert.show();
});
}
Expand Down

0 comments on commit 3b5a01c

Please sign in to comment.