MCPcopy
hub / github.com/tensorflow/playground / initTutorial

Function initTutorial

src/playground.ts:966–991  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

964};
965
966function initTutorial() {
967 if (state.tutorial == null || state.tutorial === '' || state.hideText) {
968 return;
969 }
970 // Remove all other text.
971 d3.selectAll("article div.l--body").remove();
972 let tutorial = d3.select("article").append("div")
973 .attr("class", "l--body");
974 // Insert tutorial text.
975 d3.html(`tutorials/${state.tutorial}.html`, (err, htmlFragment) => {
976 if (err) {
977 throw err;
978 }
979 tutorial.node().appendChild(htmlFragment);
980 // If the tutorial has a <title> tag, set the page title to that.
981 let title = tutorial.select("title");
982 if (title.size()) {
983 d3.select("header h1").style({
984 "margin-top": "20px",
985 "margin-bottom": "20px",
986 })
987 .text(title.text());
988 document.title = title.text();
989 }
990 });
991}
992
993function drawDatasetThumbnails() {
994 function renderThumbnail(canvas, dataGenerator) {

Callers 1

playground.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…