Code clean-up (go fmt)
This commit is contained in:
parent
0c1f326dc5
commit
da77a1230e
6 changed files with 8 additions and 9 deletions
|
@ -22,7 +22,7 @@ func NewCamera(modelName string) *Camera {
|
|||
|
||||
result := &Camera{
|
||||
CameraModel: modelName,
|
||||
CameraSlug: cameraSlug,
|
||||
CameraSlug: cameraSlug,
|
||||
}
|
||||
|
||||
return result
|
||||
|
|
|
@ -19,4 +19,4 @@ type Location struct {
|
|||
LocCountry string
|
||||
LocCountryCode string
|
||||
LocFavorite bool
|
||||
}
|
||||
}
|
||||
|
|
|
@ -64,4 +64,4 @@ func TestSearch_Photos_Camera(t *testing.T) {
|
|||
|
||||
t.Log(photos)
|
||||
t.Logf("Total Count: %d", total)
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,12 +13,12 @@ import (
|
|||
|
||||
type TensorFlow struct {
|
||||
modelPath string
|
||||
graph *tf.Graph
|
||||
labels []string
|
||||
graph *tf.Graph
|
||||
labels []string
|
||||
}
|
||||
|
||||
func NewTensorFlow(tensorFlowModelPath string) *TensorFlow {
|
||||
return &TensorFlow{modelPath:tensorFlowModelPath}
|
||||
return &TensorFlow{modelPath: tensorFlowModelPath}
|
||||
}
|
||||
|
||||
type TensorFlowLabel struct {
|
||||
|
@ -130,7 +130,6 @@ func (t *TensorFlow) findBestLabels(probabilities []float32) []TensorFlowLabel {
|
|||
return resultLabels[:5]
|
||||
}
|
||||
|
||||
|
||||
func (t *TensorFlow) makeTensorFromImage(image string, imageFormat string) (*tf.Tensor, error) {
|
||||
tensor, err := tf.NewTensor(image)
|
||||
if err != nil {
|
||||
|
|
|
@ -3,8 +3,8 @@ package server
|
|||
import (
|
||||
"github.com/gin-gonic/gin"
|
||||
"github.com/gin-gonic/gin/binding"
|
||||
"github.com/photoprism/photoprism/internal/photoprism"
|
||||
"github.com/photoprism/photoprism/internal/forms"
|
||||
"github.com/photoprism/photoprism/internal/photoprism"
|
||||
"net/http"
|
||||
"strconv"
|
||||
)
|
||||
|
|
|
@ -9,7 +9,7 @@ import (
|
|||
func Start(conf *photoprism.Config) {
|
||||
if conf.ServerMode != "" {
|
||||
gin.SetMode(conf.ServerMode)
|
||||
} else if conf.Debug == false{
|
||||
} else if conf.Debug == false {
|
||||
gin.SetMode(gin.ReleaseMode)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue