Created
January 8, 2018 10:31
-
-
Save plutov/ebd8dc8edde3b9e2b29edd899be6aca5 to your computer and use it in GitHub Desktop.
tensorflow1.go
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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