UI.prototype._setupTrainElement = function()

in web/src/ui.js [24:45]


    UI.prototype._setupTrainElement = function() {
        this._trainElement = document.createElement('div');
        this._trainElement.className = 'few-shot-container-train-data';
        this._trainElement.appendChild(createSectionHeading('Training Data'));

        for (var i = 0; i < NUM_CLASSES; ++i) {
            var cell = new DrawingCell(CELL_SIZE);
            this._cells.push(cell);
            this._trainElement.appendChild(cell.element);
        }

        this._predictions = new Predictions(NUM_CLASSES);
        this._trainElement.appendChild(this._predictions.element);

        this._clearAllButton = document.createElement('button');
        this._clearAllButton.className = 'few-shot-container-clear-all';
        this._clearAllButton.textContent = 'Edit All';
        this._clearAllButton.addEventListener('click', this._clearAll.bind(this));
        this._trainElement.appendChild(this._clearAllButton);

        this.element.appendChild(this._trainElement);
    };