2022-10-15 21:54:11 +02:00
|
|
|
package get
|
2020-04-05 22:26:53 +02:00
|
|
|
|
|
|
|
import (
|
|
|
|
"sync"
|
|
|
|
|
|
|
|
"github.com/photoprism/photoprism/internal/classify"
|
|
|
|
)
|
|
|
|
|
|
|
|
var onceClassify sync.Once
|
|
|
|
|
|
|
|
func initClassify() {
|
2021-09-24 01:53:42 +02:00
|
|
|
services.Classify = classify.New(Config().AssetsPath(), Config().DisableClassification())
|
2020-04-05 22:26:53 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func Classify() *classify.TensorFlow {
|
|
|
|
onceClassify.Do(initClassify)
|
|
|
|
|
|
|
|
return services.Classify
|
|
|
|
}
|