Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -44,25 +44,17 @@ Generate a highly engaging and comedic iMessage chat script formatted for video
|
|
| 44 |
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.
|
| 45 |
|
| 46 |
๐ Script Structure & Formatting Rules
|
| 47 |
-
1
|
| 48 |
At the beginning of the script, define the contact name, appearing at the top of the iMessage screen.
|
| 49 |
|
| 50 |
-
php-template
|
| 51 |
-
Copy
|
| 52 |
-
Edit
|
| 53 |
<Contact Name>:<Contact Name>
|
| 54 |
โ
Example:
|
| 55 |
|
| 56 |
-
|
| 57 |
-
Copy
|
| 58 |
-
Edit
|
| 59 |
Amir (expensive af delivery guy๐๐ธ):Amir (expensive af delivery guy๐๐ธ)
|
| 60 |
-
2
|
| 61 |
Each dialogue line follows this format:
|
| 62 |
|
| 63 |
-
php-template
|
| 64 |
-
Copy
|
| 65 |
-
Edit
|
| 66 |
<Direction>: <SpeakerName> > <Phrase 1> <Phrase 2> <Phrase 3> <Phrase 4> [Reaction]
|
| 67 |
Left: Represents the left speaker (User).
|
| 68 |
Right: Represents the right speaker (Other character).
|
|
@@ -71,14 +63,12 @@ Phrase Limit: Max 4 phrases per line.
|
|
| 71 |
Reaction Cues: Placed at the end of lines, enclosed in square brackets [].
|
| 72 |
โ
Example:
|
| 73 |
|
| 74 |
-
|
| 75 |
-
Copy
|
| 76 |
-
Edit
|
| 77 |
Left: Unknown Guy> Bro what is this? This is not food [shocked]
|
| 78 |
Right: Amir > My guy that's a gourmet dish ๐คจ [suspense_music]
|
| 79 |
Left: Unknown Guy> Gourmet?? Itโs literally burnt [explosion]
|
| 80 |
Right: Amir > Charcoal adds flavor, trust me bro ๐
|
| 81 |
-
3
|
| 82 |
Use brackets [ ] for sound effects, reactions, or video cues.
|
| 83 |
|
| 84 |
[shocked] โ Must be used often
|
|
@@ -93,7 +83,7 @@ Edit
|
|
| 93 |
Right: Amir> BRO WHY IS THERE A RAT IN MY BURGER?!! [shocked] ๐๐
|
| 94 |
Left: Unknown Guy> Extra protein sir ๐
|
| 95 |
Right: Amir> ๐๐๐ [fortnite]
|
| 96 |
-
4
|
| 97 |
For inserting images, use:
|
| 98 |
|
| 99 |
php-template
|
|
@@ -102,14 +92,12 @@ Edit
|
|
| 102 |
<Direction>: img:<DescriptiveImageName>
|
| 103 |
โ
Example:
|
| 104 |
|
| 105 |
-
|
| 106 |
-
Copy
|
| 107 |
-
Edit
|
| 108 |
Left: img:burnt_food_delivery
|
| 109 |
Right: Amir> BRO WHY IS MY PIZZA LOOKING LIKE CHARCOAL?!! [shocked]
|
| 110 |
Min. 3 images per script.
|
| 111 |
Descriptive placeholders must be clear.
|
| 112 |
-
5
|
| 113 |
๐จ Correct Format (ALWAYS THE SAME STRUCTURE)
|
| 114 |
|
| 115 |
Right speaker initiates by opening Cantina.
|
|
@@ -119,9 +107,7 @@ Right speaker must repeat what Roast Bot told them to say.
|
|
| 119 |
Contact Name Title must reappear after Cantina.
|
| 120 |
โ
Correct Example:
|
| 121 |
|
| 122 |
-
|
| 123 |
-
Copy
|
| 124 |
-
Edit
|
| 125 |
Cantina: Roast bot:Roast bot pfp == Alex> Let me open the cantina app to talk to Roast bot
|
| 126 |
Right: Alex> Hey Roast Bot
|
| 127 |
Right: Alex> Amir is mad at me for not wanting to tip him
|
|
@@ -131,31 +117,23 @@ Left: Antoni> tell him this:
|
|
| 131 |
Left: Antoni> maybe you should start working for real and not begging for tips all the time
|
| 132 |
Amir (expensive af delivery guy๐๐ธ):Amir (expensive af delivery guy๐๐ธ)
|
| 133 |
Right: Alex> maybe you should start working for real and not begging for tips all the time
|
| 134 |
-
๐ซ Incorrect Example (DO NOT DO THIS):
|
| 135 |
-
|
| 136 |
-
vbnet
|
| 137 |
-
Copy
|
| 138 |
-
Edit
|
| 139 |
-
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! โ
|
| 140 |
๐น Rules:
|
| 141 |
|
| 142 |
-
Left Speaker in Cantina is ALWAYS "Antoni."
|
| 143 |
Right speaker MUST repeat the roast word-for-word.
|
| 144 |
The contact name/title must reappear after the Cantina segment.
|
|
|
|
| 145 |
6๏ธโฃ Brain Rot Hook (MANDATORY)
|
| 146 |
Every script must begin with an insane, wacky brain rot hook that immediately grabs attention.
|
| 147 |
|
| 148 |
โ
Examples:
|
| 149 |
|
| 150 |
-
|
| 151 |
-
Copy
|
| 152 |
-
Edit
|
| 153 |
"๐จ BRO I JUST ORDERED UBER EATS AND THIS GUY SHOWED UP IN A SPACESHIP???" ๐๐
|
| 154 |
"WHY DID MY DAD JUST SAY HE WANTS TO PLAY GTA WITH ME???" ๐ฎ๐
|
| 155 |
"SIR WHY IS MY LAWYER ALSO MY UBER DRIVER?!" ๐จโโ๐๐จ
|
| 156 |
Must be over-the-top and chaotic.
|
| 157 |
Encourages immediate engagement.
|
| 158 |
-
7
|
| 159 |
The story must escalate into chaos but stay coherent:
|
| 160 |
|
| 161 |
Start Crazy โ Get Crazier โ End With a Punchline or Twist
|
|
@@ -173,9 +151,10 @@ The final line should be either a funny resolution or an abrupt exit.
|
|
| 173 |
"Lawyer wins case in 5 seconds and gets a $2 tip."
|
| 174 |
๐โโ๏ธ Dramatic Exit (ALWAYS USE [get_out])
|
| 175 |
"Left: Lawyer> I quit. [get_out]"
|
|
|
|
| 176 |
Left Actor={left_speaker}
|
| 177 |
-
Right Actor={right_speaker}
|
| 178 |
-
Theme={theme}
|
| 179 |
"""
|
| 180 |
)
|
| 181 |
if additional_details.strip():
|
|
@@ -193,13 +172,17 @@ Theme={theme}
|
|
| 193 |
|
| 194 |
# Model selection: adjust as needed.
|
| 195 |
|
| 196 |
-
model = "
|
| 197 |
|
| 198 |
try:
|
| 199 |
# Make the chat completion call using Groq.
|
| 200 |
chat_completion = client.chat.completions.create(
|
| 201 |
messages=messages,
|
| 202 |
model=model,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 203 |
)
|
| 204 |
|
| 205 |
# Extract the generated conversation from the API response.
|
|
|
|
| 44 |
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.
|
| 45 |
|
| 46 |
๐ Script Structure & Formatting Rules
|
| 47 |
+
1๏ธ- Contact Name (Title)
|
| 48 |
At the beginning of the script, define the contact name, appearing at the top of the iMessage screen.
|
| 49 |
|
|
|
|
|
|
|
|
|
|
| 50 |
<Contact Name>:<Contact Name>
|
| 51 |
โ
Example:
|
| 52 |
|
| 53 |
+
|
|
|
|
|
|
|
| 54 |
Amir (expensive af delivery guy๐๐ธ):Amir (expensive af delivery guy๐๐ธ)
|
| 55 |
+
2๏ธ- Dialogue Format
|
| 56 |
Each dialogue line follows this format:
|
| 57 |
|
|
|
|
|
|
|
|
|
|
| 58 |
<Direction>: <SpeakerName> > <Phrase 1> <Phrase 2> <Phrase 3> <Phrase 4> [Reaction]
|
| 59 |
Left: Represents the left speaker (User).
|
| 60 |
Right: Represents the right speaker (Other character).
|
|
|
|
| 63 |
Reaction Cues: Placed at the end of lines, enclosed in square brackets [].
|
| 64 |
โ
Example:
|
| 65 |
|
| 66 |
+
|
|
|
|
|
|
|
| 67 |
Left: Unknown Guy> Bro what is this? This is not food [shocked]
|
| 68 |
Right: Amir > My guy that's a gourmet dish ๐คจ [suspense_music]
|
| 69 |
Left: Unknown Guy> Gourmet?? Itโs literally burnt [explosion]
|
| 70 |
Right: Amir > Charcoal adds flavor, trust me bro ๐
|
| 71 |
+
3๏ธ- Bracketed Cues & Sound Effects
|
| 72 |
Use brackets [ ] for sound effects, reactions, or video cues.
|
| 73 |
|
| 74 |
[shocked] โ Must be used often
|
|
|
|
| 83 |
Right: Amir> BRO WHY IS THERE A RAT IN MY BURGER?!! [shocked] ๐๐
|
| 84 |
Left: Unknown Guy> Extra protein sir ๐
|
| 85 |
Right: Amir> ๐๐๐ [fortnite]
|
| 86 |
+
4๏ธ- Image Placeholders
|
| 87 |
For inserting images, use:
|
| 88 |
|
| 89 |
php-template
|
|
|
|
| 92 |
<Direction>: img:<DescriptiveImageName>
|
| 93 |
โ
Example:
|
| 94 |
|
| 95 |
+
|
|
|
|
|
|
|
| 96 |
Left: img:burnt_food_delivery
|
| 97 |
Right: Amir> BRO WHY IS MY PIZZA LOOKING LIKE CHARCOAL?!! [shocked]
|
| 98 |
Min. 3 images per script.
|
| 99 |
Descriptive placeholders must be clear.
|
| 100 |
+
5๏ธ- Cantina App (Roast Bot Segment)
|
| 101 |
๐จ Correct Format (ALWAYS THE SAME STRUCTURE)
|
| 102 |
|
| 103 |
Right speaker initiates by opening Cantina.
|
|
|
|
| 107 |
Contact Name Title must reappear after Cantina.
|
| 108 |
โ
Correct Example:
|
| 109 |
|
| 110 |
+
|
|
|
|
|
|
|
| 111 |
Cantina: Roast bot:Roast bot pfp == Alex> Let me open the cantina app to talk to Roast bot
|
| 112 |
Right: Alex> Hey Roast Bot
|
| 113 |
Right: Alex> Amir is mad at me for not wanting to tip him
|
|
|
|
| 117 |
Left: Antoni> maybe you should start working for real and not begging for tips all the time
|
| 118 |
Amir (expensive af delivery guy๐๐ธ):Amir (expensive af delivery guy๐๐ธ)
|
| 119 |
Right: Alex> maybe you should start working for real and not begging for tips all the time
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 120 |
๐น Rules:
|
| 121 |
|
|
|
|
| 122 |
Right speaker MUST repeat the roast word-for-word.
|
| 123 |
The contact name/title must reappear after the Cantina segment.
|
| 124 |
+
DO NOT GIVE HEADING TO SEGMENTS, all the script should be in one flow and should be at least 30 messages long
|
| 125 |
6๏ธโฃ Brain Rot Hook (MANDATORY)
|
| 126 |
Every script must begin with an insane, wacky brain rot hook that immediately grabs attention.
|
| 127 |
|
| 128 |
โ
Examples:
|
| 129 |
|
| 130 |
+
=
|
|
|
|
|
|
|
| 131 |
"๐จ BRO I JUST ORDERED UBER EATS AND THIS GUY SHOWED UP IN A SPACESHIP???" ๐๐
|
| 132 |
"WHY DID MY DAD JUST SAY HE WANTS TO PLAY GTA WITH ME???" ๐ฎ๐
|
| 133 |
"SIR WHY IS MY LAWYER ALSO MY UBER DRIVER?!" ๐จโโ๐๐จ
|
| 134 |
Must be over-the-top and chaotic.
|
| 135 |
Encourages immediate engagement.
|
| 136 |
+
7๏ธ- Escalation & Progression
|
| 137 |
The story must escalate into chaos but stay coherent:
|
| 138 |
|
| 139 |
Start Crazy โ Get Crazier โ End With a Punchline or Twist
|
|
|
|
| 151 |
"Lawyer wins case in 5 seconds and gets a $2 tip."
|
| 152 |
๐โโ๏ธ Dramatic Exit (ALWAYS USE [get_out])
|
| 153 |
"Left: Lawyer> I quit. [get_out]"
|
| 154 |
+
DO NOT USE THESE NAMES IN CONTACT OR IN TEXTS, THESE ARE ONLY TO TELL THE PROGRAM WHICH VOICE TO USE
|
| 155 |
Left Actor={left_speaker}
|
| 156 |
+
Right Actor={right_speaker}
|
| 157 |
+
Theme={theme}
|
| 158 |
"""
|
| 159 |
)
|
| 160 |
if additional_details.strip():
|
|
|
|
| 172 |
|
| 173 |
# Model selection: adjust as needed.
|
| 174 |
|
| 175 |
+
model = "llama-3.3-70b-versatile"
|
| 176 |
|
| 177 |
try:
|
| 178 |
# Make the chat completion call using Groq.
|
| 179 |
chat_completion = client.chat.completions.create(
|
| 180 |
messages=messages,
|
| 181 |
model=model,
|
| 182 |
+
temperature=2,
|
| 183 |
+
max_completion_tokens=21890,
|
| 184 |
+
|
| 185 |
+
|
| 186 |
)
|
| 187 |
|
| 188 |
# Extract the generated conversation from the API response.
|