boazchung commited on
Commit
2597bec
1 Parent(s): a4a9c53

Update index.html

Browse files
Files changed (1) hide show
  1. index.html +16 -2
index.html CHANGED
@@ -17,10 +17,24 @@
17
  <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
18
  </p>
19
  </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  <script type="module">
21
  import { HfInference } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected]/+esm';
22
-
23
- const hf = new HfInference();
 
24
 
25
  // You can also omit "model" to use the recommended model for the task
26
  const result = await hf.translation({
 
17
  <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
18
  </p>
19
  </div>
20
+
21
+ <div>
22
+ <label for="hf-token"
23
+ >Hugging Face Token (optional but limited if absent)</label
24
+ >
25
+ <input
26
+ id="hf-token"
27
+ v-model="token"
28
+ placeholder="HF-TOKEN"
29
+ type="password"
30
+ />
31
+ </div>
32
+
33
  <script type="module">
34
  import { HfInference } from 'https://cdn.jsdelivr.net/npm/@huggingface/[email protected]/+esm';
35
+ const token = document.getElementById('hf-token').value;
36
+ console.log(token);
37
+ const hf = new HfInference(token);
38
 
39
  // You can also omit "model" to use the recommended model for the task
40
  const result = await hf.translation({