mirror of
https://github.com/foomo/coreml-service-yolov8.git
synced 2025-10-16 12:25:42 +00:00
12 lines
342 B
Swift
12 lines
342 B
Swift
import Vapor
|
|
|
|
func routes(_ app: Application) throws {
|
|
var modelsPath = ""
|
|
if Environment.get("MODELS_PATH") != nil {
|
|
modelsPath = Environment.get("MODELS_PATH")!
|
|
}
|
|
let recoController = RecognitionController(modelsPath: modelsPath)
|
|
try app.register(collection: recoController)
|
|
try recoController.loadModel()
|
|
}
|