Gregniuki commited on
Commit
6aaa280
·
1 Parent(s): 8156f44

Update templates/interface.html

Browse files
Files changed (1) hide show
  1. templates/interface.html +3 -21
templates/interface.html CHANGED
@@ -44,10 +44,6 @@
44
  <input type="range" id="noise_scale_w_slider" name="noise_scale_w_slider" min="0.25" max="1" step="0.1" value="1">
45
  </div>
46
 
47
- <div>
48
- <label for="play">Auto-play:</label>
49
- <input type="checkbox" id="play" checked>
50
- </div>
51
  <div>
52
  <button type="submit" id="synthesize_button">Synthesize</button>
53
  </div>
@@ -61,9 +57,6 @@
61
  <a href="{{ file_url }}" download>Download Audio</a>
62
  {% endif %}
63
 
64
-
65
-
66
- </form>
67
  <script>
68
  function showLoadingMessage() {
69
  // Display the loading message
@@ -73,22 +66,11 @@
73
  document.getElementById("synthesize_button").disabled = true;
74
  }
75
  </script>
 
 
 
76
  <!-- Move the JavaScript code outside the conditional block -->
77
- <script>
78
- const playCheckbox = document.getElementById("play");
79
- const audioPlayer = document.getElementById("audio-player");
80
 
81
- playCheckbox.addEventListener("change", function () {
82
- console.log("Checkbox state changed"); // Add this line for debugging
83
- if (playCheckbox.checked) {
84
- console.log("Checkbox is checked"); // Add this line for debugging
85
- audioPlayer.setAttribute("autoplay", "");
86
- } else {
87
- console.log("Checkbox is unchecked"); // Add this line for debugging
88
- audioPlayer.removeAttribute("autoplay");
89
- }
90
- });
91
- </script>
92
  </body>
93
  </html>
94
 
 
44
  <input type="range" id="noise_scale_w_slider" name="noise_scale_w_slider" min="0.25" max="1" step="0.1" value="1">
45
  </div>
46
 
 
 
 
 
47
  <div>
48
  <button type="submit" id="synthesize_button">Synthesize</button>
49
  </div>
 
57
  <a href="{{ file_url }}" download>Download Audio</a>
58
  {% endif %}
59
 
 
 
 
60
  <script>
61
  function showLoadingMessage() {
62
  // Display the loading message
 
66
  document.getElementById("synthesize_button").disabled = true;
67
  }
68
  </script>
69
+
70
+ </form>
71
+
72
  <!-- Move the JavaScript code outside the conditional block -->
 
 
 
73
 
 
 
 
 
 
 
 
 
 
 
 
74
  </body>
75
  </html>
76