coyotte508 HF staff commited on
Commit
e685a5c
1 Parent(s): b2d3fac

✨ More outputs

Browse files
Files changed (1) hide show
  1. index.html +8 -4
index.html CHANGED
@@ -86,9 +86,9 @@ Describe the process from the beginning
86
  </button>
87
 
88
  <p class="text-gray-400 text-sm">Output logs</p>
89
- <pre id="logs" class="bg-gray-100 rounded p-3 mb-8 text-sm">
90
- Output will be here</pre
91
- >
92
  </form>
93
 
94
  <script type="module">
@@ -111,7 +111,11 @@ Output will be here</pre
111
  for await (const output of hf.textGenerationStream({
112
  model,
113
  inputs: prompt,
114
- use_cache: false,
 
 
 
 
115
  })) {
116
  document.getElementById("logs").textContent += output.token.text;
117
  await new Promise((resolve, reject) => setTimeout(resolve, 50));
 
86
  </button>
87
 
88
  <p class="text-gray-400 text-sm">Output logs</p>
89
+ <div id="logs" class="bg-gray-100 rounded p-3 mb-8 text-sm">
90
+ Output will be here
91
+ </div>
92
  </form>
93
 
94
  <script type="module">
 
111
  for await (const output of hf.textGenerationStream({
112
  model,
113
  inputs: prompt,
114
+ parameters: {
115
+ max_new_tokens: 250,
116
+ }
117
+ }, {
118
+ use_cache: false
119
  })) {
120
  document.getElementById("logs").textContent += output.token.text;
121
  await new Promise((resolve, reject) => setTimeout(resolve, 50));