Skip to content

Commit

Permalink
Fix LLAMA app (pytorch#3228)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: pytorch#3228

Fix a UI thread issue causing crash.

Reviewed By: cccclai

Differential Revision: D56447006

fbshipit-source-id: 02eff27d4b4cd108c95b664d04679d4f92aaf5db
  • Loading branch information
kirklandsign authored and facebook-github-bot committed Apr 23, 2024
1 parent 03c7a99 commit 4389442
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 4389442

Please sign in to comment.