jbilcke-hf HF staff commited on
Commit
49c4208
1 Parent(s): ae2cf82

add a turbo mode

Browse files
Files changed (1) hide show
  1. src/app/main.tsx +3 -1
src/app/main.tsx CHANGED
@@ -38,6 +38,8 @@ export default function Main() {
38
  setWaitABitMore(false)
39
  setGeneratingStory(true)
40
 
 
 
41
  try {
42
 
43
  const llmResponse = await getStory({ preset, prompt })
@@ -72,7 +74,7 @@ export default function Main() {
72
  setTimeout(() => {
73
  setGeneratingStory(false)
74
  setWaitABitMore(false)
75
- }, 12000)
76
  }
77
  })
78
  }, [prompt, preset?.label]) // important: we need to react to preset changes too
 
38
  setWaitABitMore(false)
39
  setGeneratingStory(true)
40
 
41
+ const enableRateLimiter = `${process.env.NEXT_PUBLIC_ENABLE_RATE_LIMITER}` === "true"
42
+
43
  try {
44
 
45
  const llmResponse = await getStory({ preset, prompt })
 
74
  setTimeout(() => {
75
  setGeneratingStory(false)
76
  setWaitABitMore(false)
77
+ }, enableRateLimiter ? 12000 : 0)
78
  }
79
  })
80
  }, [prompt, preset?.label]) // important: we need to react to preset changes too