Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -41,159 +41,140 @@ if st.button("Generate Conversation"):
|
|
| 41 |
# Build the prompt message for Groq API.
|
| 42 |
prompt = (
|
| 43 |
f"""
|
| 44 |
-
Objective
|
| 45 |
-
Generate a highly engaging and comedic iMessage chat script formatted for video generation.
|
|
|
|
| 46 |
|
| 47 |
-
|
| 48 |
-
1
|
| 49 |
-
At the beginning of the script, define the contact name
|
| 50 |
|
| 51 |
php-template
|
| 52 |
Copy
|
| 53 |
Edit
|
| 54 |
<Contact Name>:<Contact Name>
|
| 55 |
-
Example:
|
|
|
|
| 56 |
ruby
|
| 57 |
Copy
|
| 58 |
Edit
|
| 59 |
-
Amir
|
| 60 |
-
|
| 61 |
-
|
| 62 |
|
| 63 |
php-template
|
| 64 |
Copy
|
| 65 |
Edit
|
| 66 |
-
<Direction>: <SpeakerName> > <
|
| 67 |
-
|
| 68 |
-
|
| 69 |
-
|
| 70 |
-
|
| 71 |
-
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
Example:
|
| 75 |
vbnet
|
| 76 |
Copy
|
| 77 |
Edit
|
| 78 |
-
Left:
|
| 79 |
-
Right:
|
| 80 |
-
Left:
|
| 81 |
-
|
| 82 |
-
|
| 83 |
-
|
| 84 |
-
|
| 85 |
-
|
| 86 |
-
[
|
| 87 |
-
[
|
| 88 |
-
[
|
| 89 |
-
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
Example:
|
| 93 |
-
css
|
| 94 |
Copy
|
| 95 |
Edit
|
| 96 |
-
Right:
|
| 97 |
-
|
| 98 |
-
|
|
|
|
|
|
|
| 99 |
|
| 100 |
php-template
|
| 101 |
Copy
|
| 102 |
Edit
|
| 103 |
<Direction>: img:<DescriptiveImageName>
|
| 104 |
-
|
| 105 |
-
Example:
|
| 106 |
-
vbnet
|
| 107 |
-
Copy
|
| 108 |
-
Edit
|
| 109 |
-
Left: img:burnt_food_delivery
|
| 110 |
-
Right: Alex> BRO WHY IS MY PIZZA LOOKING LIKE CHARCOAL?!! [shocked]
|
| 111 |
-
1.5 Special Sections (Cantina App / Roast Bot)
|
| 112 |
-
Incorporate Roast Bot mechanics where the character opens an app mid-conversation to ask for a roast.
|
| 113 |
-
|
| 114 |
-
Format:
|
| 115 |
|
| 116 |
vbnet
|
| 117 |
Copy
|
| 118 |
Edit
|
| 119 |
-
|
| 120 |
-
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
Copy
|
| 125 |
Edit
|
| 126 |
Cantina: Roast bot:Roast bot pfp == Alex> Let me open the cantina app to talk to Roast bot
|
| 127 |
-
Right: Alex>
|
| 128 |
-
|
| 129 |
-
Right: Alex>
|
| 130 |
-
|
| 131 |
-
|
| 132 |
-
|
| 133 |
-
|
| 134 |
-
|
| 135 |
-
|
| 136 |
-
|
| 137 |
-
"SIR WHY IS MY LAWYER ALSO MY UBER DRIVER?!" ๐จโโ๏ธ๐๐จ
|
| 138 |
-
This hook should create an instant โWTF?!โ reaction and force the reader to keep watching.
|
| 139 |
-
|
| 140 |
-
2.2 Story Progression (Random but Coherent)
|
| 141 |
-
The storyline must escalate in craziness but still have a logical flow.
|
| 142 |
-
Use sudden twists and reveals to keep the audience engaged.
|
| 143 |
-
End with a memorable punchline, twist, or dramatic exit.
|
| 144 |
-
Example Storyline Flow:
|
| 145 |
-
Crazy Hook: โBRO WHY IS MY PIZZA DELIVERY GUY ALSO MY LAWYER???โ ๐๐จโโ๏ธ
|
| 146 |
-
Escalation: The lawyer admits he took the case without reading it.
|
| 147 |
-
Insane Event: The customer confesses to stealing a fighter jet.
|
| 148 |
-
Twist: Lawyer says, โOh I do that every day, sir.โ ๐
|
| 149 |
-
Final Joke/Twist: The lawyer wins the case in 5 seconds and gets a $2 tip.
|
| 150 |
-
2.3 Humor & Slang
|
| 151 |
-
Use casual meme-inspired language (brain rot humor).
|
| 152 |
-
Include exaggerated reactions (e.g., "BROOO ๐๐๐", "NO WAY", "HELP ME").
|
| 153 |
-
Use text formatting like uppercase for dramatic lines.
|
| 154 |
-
Example:
|
| 155 |
vbnet
|
| 156 |
Copy
|
| 157 |
Edit
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
-
Left
|
| 162 |
-
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
4. EXAMPLE PROMPT FOR AI MODEL
|
| 171 |
-
Input Example for AI Model:
|
| 172 |
-
|
| 173 |
-
markdown
|
| 174 |
Copy
|
| 175 |
Edit
|
| 176 |
-
|
| 177 |
-
|
| 178 |
-
|
| 179 |
-
|
| 180 |
-
|
| 181 |
-
|
| 182 |
-
|
| 183 |
-
|
| 184 |
-
|
| 185 |
-
|
| 186 |
-
|
| 187 |
-
|
| 188 |
-
|
| 189 |
-
|
| 190 |
-
|
| 191 |
-
|
| 192 |
-
|
| 193 |
-
|
| 194 |
-
|
| 195 |
-
|
| 196 |
-
|
|
|
|
|
|
|
| 197 |
Left Actor={left_speaker}
|
| 198 |
Right Actor={right_speaker}
|
| 199 |
Theme={theme}
|
|
|
|
| 41 |
# Build the prompt message for Groq API.
|
| 42 |
prompt = (
|
| 43 |
f"""
|
| 44 |
+
๐ Objective
|
| 45 |
+
Generate a highly engaging and comedic iMessage chat script formatted for video generation.
|
| 46 |
+
The script follows a structured left-right chat format, maintains a meme-heavy, brain rot style, and incorporates sound effects, reactions, and the Cantina Roast Bot segment in a specific format.
|
| 47 |
|
| 48 |
+
๐ Script Structure & Formatting Rules
|
| 49 |
+
1๏ธโฃ Contact Name (Title)
|
| 50 |
+
At the beginning of the script, define the contact name, appearing at the top of the iMessage screen.
|
| 51 |
|
| 52 |
php-template
|
| 53 |
Copy
|
| 54 |
Edit
|
| 55 |
<Contact Name>:<Contact Name>
|
| 56 |
+
โ
Example:
|
| 57 |
+
|
| 58 |
ruby
|
| 59 |
Copy
|
| 60 |
Edit
|
| 61 |
+
Amir (expensive af delivery guy๐๐ธ):Amir (expensive af delivery guy๐๐ธ)
|
| 62 |
+
2๏ธโฃ Dialogue Format
|
| 63 |
+
Each dialogue line follows this format:
|
| 64 |
|
| 65 |
php-template
|
| 66 |
Copy
|
| 67 |
Edit
|
| 68 |
+
<Direction>: <SpeakerName> > <Phrase 1> <Phrase 2> <Phrase 3> <Phrase 4> [Reaction]
|
| 69 |
+
Left: Represents the left speaker (User).
|
| 70 |
+
Right: Represents the right speaker (Other character).
|
| 71 |
+
SpeakerName: A randomly assigned name, but characters do not know their own names.
|
| 72 |
+
Phrase Limit: Max 4 phrases per line.
|
| 73 |
+
Reaction Cues: Placed at the end of lines, enclosed in square brackets [].
|
| 74 |
+
โ
Example:
|
| 75 |
+
|
|
|
|
| 76 |
vbnet
|
| 77 |
Copy
|
| 78 |
Edit
|
| 79 |
+
Left: Unknown Guy> Bro what is this? This is not food [shocked]
|
| 80 |
+
Right: Amir > My guy that's a gourmet dish ๐คจ [suspense_music]
|
| 81 |
+
Left: Unknown Guy> Gourmet?? Itโs literally burnt [explosion]
|
| 82 |
+
Right: Amir > Charcoal adds flavor, trust me bro ๐
|
| 83 |
+
3๏ธโฃ Bracketed Cues & Sound Effects
|
| 84 |
+
Use brackets [ ] for sound effects, reactions, or video cues.
|
| 85 |
+
|
| 86 |
+
[shocked] โ Must be used often
|
| 87 |
+
[fart2] โ Should be used less
|
| 88 |
+
[fortnite] โ Should be used less
|
| 89 |
+
[get_out] โ Must ONLY be used at the end of the conversation
|
| 90 |
+
โ
Example:
|
| 91 |
+
|
| 92 |
+
sql
|
|
|
|
|
|
|
| 93 |
Copy
|
| 94 |
Edit
|
| 95 |
+
Right: Amir> BRO WHY IS THERE A RAT IN MY BURGER?!! [shocked] ๐๐
|
| 96 |
+
Left: Unknown Guy> Extra protein sir ๐
|
| 97 |
+
Right: Amir> ๐๐๐ [fortnite]
|
| 98 |
+
4๏ธโฃ Image Placeholders
|
| 99 |
+
For inserting images, use:
|
| 100 |
|
| 101 |
php-template
|
| 102 |
Copy
|
| 103 |
Edit
|
| 104 |
<Direction>: img:<DescriptiveImageName>
|
| 105 |
+
โ
Example:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
|
| 107 |
vbnet
|
| 108 |
Copy
|
| 109 |
Edit
|
| 110 |
+
Left: img:burnt_food_delivery
|
| 111 |
+
Right: Amir> BRO WHY IS MY PIZZA LOOKING LIKE CHARCOAL?!! [shocked]
|
| 112 |
+
Min. 3 images per script.
|
| 113 |
+
Descriptive placeholders must be clear.
|
| 114 |
+
5๏ธโฃ Cantina App (Roast Bot Segment)
|
| 115 |
+
๐จ Correct Format (ALWAYS THE SAME STRUCTURE)
|
| 116 |
+
|
| 117 |
+
Right speaker initiates by opening Cantina.
|
| 118 |
+
Right speaker asks Roast Bot for help.
|
| 119 |
+
Left speaker (ALWAYS Antoni) responds.
|
| 120 |
+
Right speaker must repeat what Roast Bot told them to say.
|
| 121 |
+
Contact Name Title must reappear after Cantina.
|
| 122 |
+
โ
Correct Example:
|
| 123 |
+
|
| 124 |
+
sql
|
| 125 |
Copy
|
| 126 |
Edit
|
| 127 |
Cantina: Roast bot:Roast bot pfp == Alex> Let me open the cantina app to talk to Roast bot
|
| 128 |
+
Right: Alex> Hey Roast Bot
|
| 129 |
+
Right: Alex> Amir is mad at me for not wanting to tip him
|
| 130 |
+
Right: Alex> help me roast him
|
| 131 |
+
Left: Antoni> okay
|
| 132 |
+
Left: Antoni> tell him this:
|
| 133 |
+
Left: Antoni> maybe you should start working for real and not begging for tips all the time
|
| 134 |
+
Amir (expensive af delivery guy๐๐ธ):Amir (expensive af delivery guy๐๐ธ)
|
| 135 |
+
Right: Alex> maybe you should start working for real and not begging for tips all the time
|
| 136 |
+
๐ซ Incorrect Example (DO NOT DO THIS):
|
| 137 |
+
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 138 |
vbnet
|
| 139 |
Copy
|
| 140 |
Edit
|
| 141 |
+
Cantina: Roast bot:Roast bot pfp == Liam> Hey Roast Bot, we need your help! Amir's spaceship crashed on Mars and we need to get him back to Earth! โ
|
| 142 |
+
๐น Rules:
|
| 143 |
+
|
| 144 |
+
Left Speaker in Cantina is ALWAYS "Antoni."
|
| 145 |
+
Right speaker MUST repeat the roast word-for-word.
|
| 146 |
+
The contact name/title must reappear after the Cantina segment.
|
| 147 |
+
6๏ธโฃ Brain Rot Hook (MANDATORY)
|
| 148 |
+
Every script must begin with an insane, wacky brain rot hook that immediately grabs attention.
|
| 149 |
+
|
| 150 |
+
โ
Examples:
|
| 151 |
+
|
| 152 |
+
arduino
|
|
|
|
|
|
|
|
|
|
|
|
|
| 153 |
Copy
|
| 154 |
Edit
|
| 155 |
+
"๐จ BRO I JUST ORDERED UBER EATS AND THIS GUY SHOWED UP IN A SPACESHIP???" ๐๐
|
| 156 |
+
"WHY DID MY DAD JUST SAY HE WANTS TO PLAY GTA WITH ME???" ๐ฎ๐
|
| 157 |
+
"SIR WHY IS MY LAWYER ALSO MY UBER DRIVER?!" ๐จโโ๐๐จ
|
| 158 |
+
Must be over-the-top and chaotic.
|
| 159 |
+
Encourages immediate engagement.
|
| 160 |
+
7๏ธโฃ Escalation & Progression
|
| 161 |
+
The story must escalate into chaos but stay coherent:
|
| 162 |
+
|
| 163 |
+
Start Crazy โ Get Crazier โ End With a Punchline or Twist
|
| 164 |
+
Use sudden twists and reveals to maintain engagement.
|
| 165 |
+
The final line should be either a funny resolution or an abrupt exit.
|
| 166 |
+
โ
Example Progression:
|
| 167 |
+
|
| 168 |
+
๏ฟฝ๏ฟฝ๏ฟฝ๏ฟฝ Crazy Hook:
|
| 169 |
+
"BRO WHY IS MY PIZZA DELIVERY GUY ALSO MY LAWYER???" ๐๐จโโ
|
| 170 |
+
๐ฅ Escalation:
|
| 171 |
+
"Sir, we found out you stole a fighter jet."
|
| 172 |
+
๐ญ Insane Event:
|
| 173 |
+
"Oh that? I do that every Tuesday, itโs fine."
|
| 174 |
+
๐คฏ Twist:
|
| 175 |
+
"Lawyer wins case in 5 seconds and gets a $2 tip."
|
| 176 |
+
๐โโ๏ธ Dramatic Exit (ALWAYS USE [get_out])
|
| 177 |
+
"Left: Lawyer> I quit. [get_out]"
|
| 178 |
Left Actor={left_speaker}
|
| 179 |
Right Actor={right_speaker}
|
| 180 |
Theme={theme}
|