UNPKG

gia-ast

Version:
46 lines (40 loc) 1.09 kB
const fs = require('fs'); const { toASTMetaServer, aSTMetaServerToJson } = require('./AstMetaServer.js'); function createAndSaveMetadata(filename, data) { const astMetaServerObject = toASTMetaServer(JSON.stringify(data)); const json = aSTMetaServerToJson(astMetaServerObject); fs.writeFileSync(filename, json); } function createMetaData(modelname, fname, containername, containertag, checkpointno, svrtype, mtype, type, autoabc, callurl, PASS1IMAGESIZE, getmetaurl, created) { return { modelname, fname, containername, containertag, checkpointno, svrtype, mtype, type, autoabc, callurl, PASS1IMAGESIZE, getmetaurl, created }; } const data = createMetaData( "model_gia-ds-ginko-2403g-864x_new", "ginko-2403g", "ast_ginko-2403g-864x_15m_s1_", "guillaumeai/server:ast-210502-compo-three-v2-dev", "15", "s1", "ast", "singleone", "", "http://localhost:9100/stylize", "2048", "http://localhost/9100.json", "Thu 21 Mar 2024 08:30:10 AM EDT" ); createAndSaveMetadata('sample-out-mmetadata.json', data);