Skip to content

Commit 91fdf88

Browse files
authored
Update ContentView.swift
1 parent 6681801 commit 91fdf88

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

examples/demo-apps/apple_ios/LLaMA/LLaMA/Application/ContentView.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,14 @@ struct ContentView: View {
8989

9090
static func fromPath(_ path: String) -> ModelType {
9191
let filename = (path as NSString).lastPathComponent.lowercased()
92-
if filename.hasPrefix("llama") {
92+
if filename.contains("llama") {
9393
return .llama
94-
} else if filename.hasPrefix("llava") {
94+
} else if filename.contains("llava") {
9595
return .llava
96-
} else if filename.hasPrefix("qwen3") {
96+
} else if filename.contains("qwen3") {
9797
return .qwen3
9898
}
99-
print("Unknown model type in path: \(path). Model filename should start with one of: llama, llava, or qwen3")
99+
print("Unknown model type in path: \(path). Model filename should contain one of following words: llama, llava, or qwen3")
100100
exit(1)
101101
}
102102
}

0 commit comments

Comments
 (0)