Skip to content

Instantly share code, notes, and snippets.

@Nithanaroy
Created August 16, 2020 03:45
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 Nithanaroy/af020ee1440a34405f6004fe19c61ecd to your computer and use it in GitHub Desktop.
Save Nithanaroy/af020ee1440a34405f6004fe19c61ecd to your computer and use it in GitHub Desktop.
App script file which loads a trained model from drive for serving
function loadModelFromDrive() {
const f = DriveApp.getFileById("1iO0Lz3022AHgTOR4Xd_WLuR1FVXNUIdU")
const modeljson = f.getAs("application/json").getDataAsString();
const f2 = DriveApp.getFileById("1bDZaBUjweWy-KwGpQP68eoJLMulUfXYZ")
const weights = f2.getBlob().getBytes()
return [modeljson, weights]
}
function doGet() {
return HtmlService.createHtmlOutputFromFile("index")
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment