Skip to content

Instantly share code, notes, and snippets.

@plutov
Created January 8, 2018 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save plutov/ebd8dc8edde3b9e2b29edd899be6aca5 to your computer and use it in GitHub Desktop.
Save plutov/ebd8dc8edde3b9e2b29edd899be6aca5 to your computer and use it in GitHub Desktop.
tensorflow1.go
func main() {
os.Setenv("TF_CPP_MIN_LOG_LEVEL", "2")
if len(os.Args) < 2 {
log.Fatalf("usage: imgrecognition <image_url>")
}
fmt.Printf("url: %s\n", os.Args[1])
// Get image from URL
response, e := http.Get(os.Args[1])
if e != nil {
log.Fatalf("unable to get image from url: %v", e)
}
defer response.Body.Close()
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment