boazchung commited on
Commit
ca250ec
1 Parent(s): 86b47ab

Update translation.html

Browse files
Files changed (1) hide show
  1. translation.html +9 -4
translation.html CHANGED
@@ -105,13 +105,13 @@
105
  const model = document.getElementById("model").value.trim();
106
  const prompt = document.getElementById("prompt").value.trim();
107
  document.getElementById("logs").textContent = "";
108
- await (let result of hf.tanslation({
 
109
  model,
110
- inputs: prompt,
111
- parameters: { max_new_tokens: 250 }
112
  }, {
113
  use_cache: false
114
- })) {
115
  //document.getElementById("logs").textContent += output.token.text;
116
  document.getElementById("logs").innerText = JSON.stringify(result, null, 2);
117
  }
@@ -134,6 +134,11 @@
134
 
135
  document.getElementById("outputArea").innerText = JSON.stringify(result, null, 2);
136
  }
 
 
 
 
 
137
  */
138
  </script>
139
  </body>
 
105
  const model = document.getElementById("model").value.trim();
106
  const prompt = document.getElementById("prompt").value.trim();
107
  document.getElementById("logs").textContent = "";
108
+ //await (let result of hf.tanslation({
109
+ let result = await hf.translation({
110
  model,
111
+ inputs: prompt
 
112
  }, {
113
  use_cache: false
114
+ }) {
115
  //document.getElementById("logs").textContent += output.token.text;
116
  document.getElementById("logs").innerText = JSON.stringify(result, null, 2);
117
  }
 
134
 
135
  document.getElementById("outputArea").innerText = JSON.stringify(result, null, 2);
136
  }
137
+
138
+ await inference.translation({
139
+ model: 't5-base',
140
+ inputs: 'My name is Wolfgang and I live in Amsterdam'
141
+ })
142
  */
143
  </script>
144
  </body>