photoprism/internal/config/tensorflow.go
Michael Mayer 7940786ce9 UX: Refactor config options to be more intuitive
Make sure to update your local config files when upgrading as
the name of some config values has changed. The default
config path has changed from "settings" to "config".
2020-12-18 09:11:42 +01:00

22 lines
550 B
Go

package config
import (
"path/filepath"
tf "github.com/tensorflow/tensorflow/tensorflow/go"
)
// TensorFlowVersion returns the TenorFlow framework version.
func (c *Config) TensorFlowVersion() string {
return tf.Version()
}
// TensorFlowModelPath returns the TensorFlow model path.
func (c *Config) TensorFlowModelPath() string {
return filepath.Join(c.AssetsPath(), "nasnet")
}
// NSFWModelPath returns the "not safe for work" TensorFlow model path.
func (c *Config) NSFWModelPath() string {
return filepath.Join(c.AssetsPath(), "nsfw")
}