jbilcke-hf HF staff commited on
Commit
9e78595
1 Parent(s): 4ae6e3c

add some limits

Browse files
Files changed (2) hide show
  1. public/index.html +3 -0
  2. src/index.mts +1 -5
public/index.html CHANGED
@@ -106,6 +106,9 @@
106
  function app() {
107
  return {
108
  open: false,
 
 
 
109
  promptDraft:
110
  new URLSearchParams(window.location.search).get("prompt") ||
111
  "A simple page to compute the BMI (use SI units)",
 
106
  function app() {
107
  return {
108
  open: false,
109
+ examples: {
110
+ 'page about dolphins': 'a page about dolphins, with text and a few pictures'
111
+ },
112
  promptDraft:
113
  new URLSearchParams(window.location.search).get("prompt") ||
114
  "A simple page to compute the BMI (use SI units)",
src/index.mts CHANGED
@@ -1,13 +1,8 @@
1
- import { pipeline } from 'stream'
2
- import { promisify } from 'util'
3
-
4
  import express from 'express'
5
  import { HfInference } from '@huggingface/inference'
6
 
7
  import { daisy } from './daisy.mts'
8
 
9
- const pipe = promisify(pipeline)
10
-
11
  const hfi = new HfInference(process.env.HF_API_TOKEN)
12
  const hf = hfi.endpoint(process.env.HF_ENDPOINT_URL)
13
 
@@ -80,6 +75,7 @@ ${daisy}
80
  - Use a color scheme consistent with the brief and theme
81
  - To generate all your images, import from from this route: "/image?prompt=<description or caption of an image, photo or illustration>"
82
  - please be descriptive for the prompt, eg describe the scene in a few words (textures, characters, materials, camera type etc)
 
83
  - You must use Tailwind CSS and Daisy UI for the CSS classes, vanilla JS and Alpine.js for the JS.
84
  - All the JS code will be written directly inside the page, using <script type='text/javascript'>...</script>
85
  - You MUST use English, not Latin! (I repeat: do NOT write lorem ipsum!)
 
 
 
 
1
  import express from 'express'
2
  import { HfInference } from '@huggingface/inference'
3
 
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
 
 
75
  - Use a color scheme consistent with the brief and theme
76
  - To generate all your images, import from from this route: "/image?prompt=<description or caption of an image, photo or illustration>"
77
  - please be descriptive for the prompt, eg describe the scene in a few words (textures, characters, materials, camera type etc)
78
+ - do not add more than 3 or 4 images
79
  - You must use Tailwind CSS and Daisy UI for the CSS classes, vanilla JS and Alpine.js for the JS.
80
  - All the JS code will be written directly inside the page, using <script type='text/javascript'>...</script>
81
  - You MUST use English, not Latin! (I repeat: do NOT write lorem ipsum!)