function createSliders(generator) {
  const latentDims = generator.inputs[0].shape[1];
  latentSliders = [];
  for (let i = 0; i < latentDims; ++i) {
    const slider = document.createElement('input');
    slider.setAttribute('type', 'range');
    slider.min = 0;
    slider.max = 1;
    slider.step = 0.01;
    slider.value = 0.5;
    slider.addEventListener('change', () => {
      generateAndVisualizeImages(generator);
    });

    slidersContainer.appendChild(slider);
    latentSliders.push(slider);
  }
  slidersContainer.style.display = 'none';
  zSpaceToggleButton.disabled = false;
  zSpaceToggleButton.textContent = `Show z-vector sliders (${latentDims} dimensions)`;
}
Create sliders for the latent space.

@param {tf.Model} generator The generator part of the trained ACGAN.