jbilcke-hf HF staff commited on
Commit
c9b3489
1 Parent(s): 0ec37ec

improve the prompt

Browse files
src/app/api/v1/create/checkCaptions.ts CHANGED
@@ -3,7 +3,7 @@ export function checkCaptions(input: string): {
3
  hasCaptions: boolean
4
  } {
5
 
6
- const prompt = input.replaceAll(/,? ?(?:no|without|skip|hide|empty|remove|delete) (?:(?:the|any|all) )?(?:comment|caption|commentary|sub|subtitle|title|subtext|commentarie)s?(?: (?:pls|plz|please|thanks?))?/gi, "")
7
 
8
  return {
9
  prompt,
 
3
  hasCaptions: boolean
4
  } {
5
 
6
+ const prompt = input.replaceAll(/,? ?(?:no|without|skip|hide|empty|remove|delete) (?:(?:the|any|all) )?(?:commentary|comment|caption|subtitle|subtext|sub|title|commentarie)(?: (?:pls|plz|please|thanks?))?/gi, "")
7
 
8
  return {
9
  prompt,
src/app/api/v1/edit/story/extendLatentStoryWithMoreShots.ts CHANGED
@@ -61,10 +61,11 @@ export async function extendLatentStoryWithMoreShots({
61
  console.log("extendLatentStoryWithMoreShots(): WARNING: we hit the max character limit (${nbMaxCharacters} chars)")
62
  }
63
 
64
- const userPrompt = `General description of the whole video: ${prompt}
65
-
66
  number of shots to extend: ${nbShots}
67
 
 
 
68
  \`\`\`yaml
69
  ${compressedStory}
70
  \`\`\`
 
61
  console.log("extendLatentStoryWithMoreShots(): WARNING: we hit the max character limit (${nbMaxCharacters} chars)")
62
  }
63
 
64
+ const userPrompt = `
 
65
  number of shots to extend: ${nbShots}
66
 
67
+ Guidelines for what to generate in the following scenes: ${prompt}
68
+
69
  \`\`\`yaml
70
  ${compressedStory}
71
  \`\`\`