Commit
•
ab73051
1
Parent(s):
f60dda0
improvement
Browse files- README.md +1 -1
- public/index.html +2 -2
- 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=
|
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
|
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
|
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 =
|
13 |
|
14 |
-
console.log("timeout set to
|
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}
|
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 |
|