Skip to content

Commit 2dd6cff

Browse files
Copilotkirklandsign
andcommitted
Fix model and tokenizer path TextViews to display full paths instead of filenames
Co-authored-by: kirklandsign <107070759+kirklandsign@users.noreply.github.com>
1 parent 02ee24d commit 2dd6cff

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

llm/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/SettingsActivity.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -147,11 +147,11 @@ private void setupSettings() {
147147
});
148148
mModelFilePath = mSettingsFields.getModelFilePath();
149149
if (!mModelFilePath.isEmpty()) {
150-
mModelTextView.setText(getFilenameFromPath(mModelFilePath));
150+
mModelTextView.setText(mModelFilePath);
151151
}
152152
mTokenizerFilePath = mSettingsFields.getTokenizerFilePath();
153153
if (!mTokenizerFilePath.isEmpty()) {
154-
mTokenizerTextView.setText(getFilenameFromPath(mTokenizerFilePath));
154+
mTokenizerTextView.setText(mTokenizerFilePath);
155155
}
156156
mDataPath = mSettingsFields.getDataPath();
157157
if (mDataPath != null && !mDataPath.isEmpty()) {
@@ -389,7 +389,7 @@ private void setupModelSelectorDialog() {
389389
-1,
390390
(dialog, item) -> {
391391
mModelFilePath = pteFiles[item];
392-
mModelTextView.setText(getFilenameFromPath(mModelFilePath));
392+
mModelTextView.setText(mModelFilePath);
393393
updateLoadModelButtonState();
394394
dialog.dismiss();
395395
});
@@ -478,7 +478,7 @@ private void setupTokenizerSelectorDialog() {
478478
-1,
479479
(dialog, item) -> {
480480
mTokenizerFilePath = tokenizerFiles[item];
481-
mTokenizerTextView.setText(getFilenameFromPath(mTokenizerFilePath));
481+
mTokenizerTextView.setText(mTokenizerFilePath);
482482
updateLoadModelButtonState();
483483
dialog.dismiss();
484484
});

0 commit comments

Comments
 (0)