You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: llm/android/LlamaDemo/app/src/main/java/com/example/executorchllamademo/ui/viewmodel/ModelSettingsViewModel.kt
+6-4Lines changed: 6 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -283,7 +283,12 @@ class ModelSettingsViewModel : ViewModel() {
283
283
*/
284
284
funselectTempTokenizer(tokenizerPath:String) {
285
285
tempTokenizerPath = tokenizerPath
286
-
addModelStep =3
286
+
// Auto-detect model type from PTE filename
287
+
val detectedType =ModelType.fromFilePath(tempModelPath)
288
+
if (detectedType !=null) {
289
+
tempModelType = detectedType
290
+
}
291
+
addModelStep =3// Skip model type, go to adapters
287
292
}
288
293
289
294
/**
@@ -342,9 +347,6 @@ class ModelSettingsViewModel : ViewModel() {
0 commit comments