Public
Edited
Apr 27, 2023
Insert cell
Insert cell
(await model.embed("hello Daniel")).dataSync()
Insert cell
job_data = [ {title:"ceo",code:'11-1011'},{title:"chief executive officer",code:'11-1011'},{"president":'11-1011'},
{title:"ceo",code:'11-1011'}]
Insert cell
(await model.embed(job_data[0].title)).dataSync()
Insert cell
r={
let r = []
for (let x=0;x<4;x++) {
r[x] = job_data[0]
print(job_data[0].title)
r[x].embeddings = (await model.embed(job_data[0].title)).dataSync()
}
return r
}
Insert cell
r
Insert cell
jonas = import("https://episphere.github.io/gpt/export.js")
Insert cell
model = await use.load()
Insert cell
tfjs = import("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs")
Insert cell
use = require("https://cdn.jsdelivr.net/npm/universal-sentence-encoder-node")
Insert cell
require("https://cdn.jsdelivr.net/npm/@tensorflow/tfjs-backend-webgl")
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