You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

36 lines
732 B

package main
import (
"fmt"
"log"
"net/http"
"strconv"
"time"
)
//dataset := make(Dataset)
var dataset Dataset
func main() {
readConfig("./config.json")
c.Cyan("reading images datasets")
tStart := time.Now()
dataset = readDataset("./dataset")
fmt.Print("time spend reading images: ")
fmt.Println(time.Since(tStart))
fmt.Println("total folders scanned: " + strconv.Itoa(len(dataset)))
numImages := 0
for _, v := range dataset {
numImages = numImages + len(v)
}
c.Cyan("total images in dataset: " + strconv.Itoa(numImages))
//we have the images in the dataset variable
//now, can take images
c.Green("server running")
router := NewRouter()
log.Fatal(http.ListenAndServe(":"+config.ServerPort, router))
}