jbilcke-hf HF staff commited on
Commit
109f3e6
1 Parent(s): d0524ae

improvement

Browse files
Files changed (3) hide show
  1. README.md +1 -4
  2. public/index.html +2 -2
  3. src/index.mts +1 -3
README.md CHANGED
@@ -19,10 +19,7 @@ Ready to be used in a Hugging Face Space.
19
  ## Local prompt examples
20
 
21
  ```
22
- http://localhost:7860/?prompt=a%20pong%20game%20clone%20in%20HTML,%20made%20using%20the%20canvas
23
- ```
24
- ```
25
- http://localhost:7860/?prompt=a simple html canvas game where we need to feed tadpoles controlled by an AI. The tadpoles move randomly, but when the user click inside the canvas to add some kind of food, the tadpoles will compete to eat it. Tadpole who didn't eat will die, and those who ate will reproduce.
26
  ```
27
 
28
  # Installation
 
19
  ## Local prompt examples
20
 
21
  ```
22
+ http://localhost:7860/?prompt=A%20simple%20page%20to%20compute%20the%20BMI%20(use%20SI%20units)
 
 
 
23
  ```
24
 
25
  # Installation
public/index.html CHANGED
@@ -31,7 +31,7 @@
31
  name="promptDraft"
32
  x-model="promptDraft"
33
  rows="10"
34
- placeholder="A simple page to compute the bmi, using kg and meters"
35
  class="input input-bordered w-full rounded text-stone-500 bg-stone-300 font-mono
36
  text-md md:text-lg
37
  h-24 md:h-48
@@ -100,7 +100,7 @@ function humanFileSize(bytes, si=false, dp=1) {
100
  function app() {
101
  return {
102
  open: false,
103
- promptDraft: new URLSearchParams(window.location.search).get('prompt') || 'A simple page to compute the bmi, using kg and meters',
104
  prompt: '',
105
  size: 0,
106
  minPromptSize: 16, // if you change this, you will need to also change in src/index.mts
 
31
  name="promptDraft"
32
  x-model="promptDraft"
33
  rows="10"
34
+ placeholder="A simple page to compute the BMI (use SI units)"
35
  class="input input-bordered w-full rounded text-stone-500 bg-stone-300 font-mono
36
  text-md md:text-lg
37
  h-24 md:h-48
 
100
  function app() {
101
  return {
102
  open: false,
103
+ promptDraft: new URLSearchParams(window.location.search).get('prompt') || 'A simple page to compute the BMI (use SI units)',
104
  prompt: '',
105
  size: 0,
106
  minPromptSize: 16, // if you change this, you will need to also change in src/index.mts
src/index.mts CHANGED
@@ -4,8 +4,6 @@ import { HfInference } from '@huggingface/inference'
4
  import { daisy } from "./daisy.mts"
5
 
6
  const hfi = new HfInference(process.env.HF_API_TOKEN)
7
-
8
- console.log('HF_ENDPOINT_URL:', process.env.HF_ENDPOINT_URL)
9
  const hf = hfi.endpoint(process.env.HF_ENDPOINT_URL)
10
 
11
  const app = express()
@@ -129,5 +127,5 @@ ${daisy}
129
 
130
  })
131
 
132
- app.listen(port, () => { console.log(`Open http://localhost:${port}/?prompt=a%20pong%20game%20clone%20in%20HTML,%20made%20using%20the%20canvas`) })
133
 
 
4
  import { daisy } from "./daisy.mts"
5
 
6
  const hfi = new HfInference(process.env.HF_API_TOKEN)
 
 
7
  const hf = hfi.endpoint(process.env.HF_ENDPOINT_URL)
8
 
9
  const app = express()
 
127
 
128
  })
129
 
130
+ app.listen(port, () => { console.log(`Open http://localhost:${port}`) })
131