boazchung commited on
Commit
0281807
1 Parent(s): 6bf8b5f

Update translation.html

Browse files
Files changed (1) hide show
  1. translation.html +6 -2
translation.html CHANGED
@@ -60,7 +60,7 @@
60
  Translate:</label>
61
  <input type="text" class="form-control flex-grow-1" id="translationText2" value="My name is Wolfgang and I live in Amsterdam"
62
  placeholder="Enter text" style="margin-right: 15px; margin-left: 15px;">
63
- <button id="translateButton2" class="btn btn-primary" onclick="translateText()">Translate</button>
64
  </div>
65
 
66
  <div class="mt-4">
@@ -117,7 +117,11 @@
117
 
118
  */
119
  // Initialize the model after the DOM is completely loaded
120
- window.addEventListener("DOMContentLoaded", initializeModel);
 
 
 
 
121
  </script>
122
  </body>
123
 
 
60
  Translate:</label>
61
  <input type="text" class="form-control flex-grow-1" id="translationText2" value="My name is Wolfgang and I live in Amsterdam"
62
  placeholder="Enter text" style="margin-right: 15px; margin-left: 15px;">
63
+ <button id="translateButton2" class="btn btn-primary">Translate</button>
64
  </div>
65
 
66
  <div class="mt-4">
 
117
 
118
  */
119
  // Initialize the model after the DOM is completely loaded
120
+
121
+ window.addEventListener("DOMContentLoaded", (event) => {
122
+ initializeModel();
123
+ document.getElementById("translateButton2").addEventListener("click", translateText);
124
+ });
125
  </script>
126
  </body>
127