Created
June 13, 2013 15:41
-
-
Save corynissen/5774747 to your computer and use it in GitHub Desktop.
google prediction api example request
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
hosted.model <- "sample.languageid" | |
model.url <- "https://www.googleapis.com/prediction/v1.5/hostedmodels/" | |
model.curl.request <- paste0('curl -k --header "Content-Type: application/json" --data \'{"input":{"csvInstance":["Como se llama?"]}}\' -H "Authorization: Bearer ', token_code, '" https://www.googleapis.com/prediction/v1.5/hostedmodels/sample.languageid/predict?key=', api_key, " --verbose") | |
system(model.curl.request, intern=T) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment