jbilcke-hf HF staff commited on
Commit
ab73051
1 Parent(s): f60dda0

improvement

Browse files
Files changed (3) hide show
  1. README.md +1 -1
  2. public/index.html +2 -2
  3. src/index.mts +3 -3
README.md CHANGED
@@ -18,7 +18,7 @@ Ready to be used in a Hugging Face Space.
18
 
19
 
20
  ```
21
- http://localhost:7860/?prompt=a%20simple%20hello%20world%20page
22
  ```
23
 
24
  # Installation
 
18
 
19
 
20
  ```
21
+ http://localhost:7860/?prompt=A%20simple%20page%20to%20compute%20the%20BMI%20(use%20SI%20units)
22
  ```
23
 
24
  # Installation
public/index.html CHANGED
@@ -42,7 +42,7 @@
42
  name="promptDraft"
43
  x-model="promptDraft"
44
  rows="10"
45
- placeholder="A simple page to compute the bmi, using kg and meters"
46
  class="input input-bordered w-full rounded text-lg text-stone-500 bg-stone-300 font-mono h-48"
47
  ></textarea>
48
  <button
@@ -108,7 +108,7 @@ function humanFileSize(bytes, si=false, dp=1) {
108
  function app() {
109
  return {
110
  open: false,
111
- promptDraft: new URLSearchParams(window.location.search).get('prompt') || 'A simple page to compute the bmi, using kg and meters',
112
  prompt: '',
113
  modelDraft: '',
114
  model: '',
 
42
  name="promptDraft"
43
  x-model="promptDraft"
44
  rows="10"
45
+ placeholder="A simple page to compute the BMI (use SI units)"
46
  class="input input-bordered w-full rounded text-lg text-stone-500 bg-stone-300 font-mono h-48"
47
  ></textarea>
48
  <button
 
108
  function app() {
109
  return {
110
  open: false,
111
+ promptDraft: new URLSearchParams(window.location.search).get('prompt') || 'A simple page to compute the BMI (use SI units)',
112
  prompt: '',
113
  modelDraft: '',
114
  model: '',
src/index.mts CHANGED
@@ -9,9 +9,9 @@ const app = express()
9
  const port = 7860
10
 
11
  const minPromptSize = 16 // if you change this, you will need to also change in public/index.html
12
- const timeoutInSec = 3 * 60
13
 
14
- console.log("timeout set to 3 minutes")
15
 
16
  app.use(express.static("public"))
17
 
@@ -120,5 +120,5 @@ Generate the following: ${req.query.prompt}
120
 
121
  })
122
 
123
- app.listen(port, () => { console.log(`Open http://localhost:${port}/?prompt=a%20pong%20game%20clone%20in%20HTML,%20made%20using%20the%20canvas`) })
124
 
 
9
  const port = 7860
10
 
11
  const minPromptSize = 16 // if you change this, you will need to also change in public/index.html
12
+ const timeoutInSec = 15 * 60
13
 
14
+ console.log("timeout set to 15 minutes")
15
 
16
  app.use(express.static("public"))
17
 
 
120
 
121
  })
122
 
123
+ app.listen(port, () => { console.log(`Open http://localhost:${port}/`) })
124