Public
Edited
Jul 20, 2023
Insert cell
Insert cell
tf = require("@tensorflow/tfjs")
Insert cell
window.tf = tf
Insert cell
use = await require("@tensorflow-models/universal-sentence-encoder")
Insert cell
use_model = await use.load()
Insert cell
viewof xw_select = Inputs.select( models.map(m=>m.model) )
Insert cell
sw=import("https://cdn.jsdelivr.net/gh/danielruss/soc_walk@latest/socwalk.js")
Insert cell
model_url = `https://danielruss.github.io/soc_walk_models/${models.reduce( (acc,cur) => (xw_select==cur.model)?cur.name:acc,"")}/model.json`
Insert cell
xw_model = sw.socwalk.load_model(model_url)
Insert cell
Insert cell
viewof input_csv_data = Inputs.file({label: "Input data", accept: ".csv", required: true})
Insert cell
input_data = input_csv_data.csv()
Insert cell
models=[ {system:"soc1980",model:"20230713.soc1980",name:"socwalk_2023_07_13_js"},{system:"noc2011",model:"20230717.noc2011",name:"socwalk_noc_2023_07_17_js"}]
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more