abdulllah01 commited on
Commit
67dc374
ยท
verified ยท
1 Parent(s): 8f393c2

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +99 -118
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. The script should use distinct left and right voices, follow a structured format, and maintain a brain rot hook to keep the audience engaged. The story should be wacky, over-the-top, and meme-inspired while staying coherent.
 
46
 
47
- 1. FORMAT STRUCTURE (Regex-like Guide)
48
- 1.1 Contact Name (Title)
49
- At the beginning of the script, define the contact name (the name that appears at the top of the iMessage screen).
50
 
51
  php-template
52
  Copy
53
  Edit
54
  <Contact Name>:<Contact Name>
55
- Example:
 
56
  ruby
57
  Copy
58
  Edit
59
- Amir Uber Eats๐Ÿ”๐Ÿšš๐Ÿ—ฟ:Amir Uber Eats๐Ÿ”๐Ÿšš๐Ÿ—ฟ
60
- 1.2 Dialogue Format
61
- Every dialogue line should follow this structure:
62
 
63
  php-template
64
  Copy
65
  Edit
66
- <Direction>: <SpeakerName> > <Dialogue> [<Reaction>]
67
- <Direction> โ†’ Either Left: or Right:
68
- Left: represents the left speaker (User).
69
- Right: represents the right speaker (Other character).
70
- <SpeakerName> โ†’ The voice actor name (which should remain consistent for left and right).
71
- > โ†’ A separator between the speaker name and their dialogue.
72
- <Dialogue> โ†’ The actual speech text, containing humor, slang, or randomness.
73
- [<Reaction>] (Optional) โ†’ Emotional or sound-based cues (e.g., [shocked], [fart2], [get_out]).
74
- Example:
75
  vbnet
76
  Copy
77
  Edit
78
- Left: Chinmay> Sir this is your Uber Eats order [shocked]
79
- Right: Alex> BRO WHY IS THERE A RAT IN MY BURGER?!! [shocked] ๐Ÿ€๐Ÿ”
80
- Left: Chinmay> Extra protein sir ๐Ÿ˜Ž
81
- 1.3 Bracketed Cues & Sound Effects
82
- Use brackets [] to include sound effects, reactions, or video cues.
83
-
84
- Common Examples:
85
-
86
- [shocked] โ†’ Indicates the character is shocked.
87
- [get_out] โ†’ Indicates the end of the conversation or dramatic exit.
88
- [fart2] โ†’ Represents a comedic fart sound.
89
- [suspense_music] โ†’ A cue for background music.
90
- [explosion] โ†’ A big moment or reveal.
91
- [slow_zoom] โ†’ A slow zoom-in effect for emphasis.
92
- Example:
93
- css
94
  Copy
95
  Edit
96
- Right: Alex> WHY DID MY HOUSE JUST EXPLODE?!!! [explosion] ๐Ÿ’€๐Ÿ’€๐Ÿ’€
97
- 1.4 Image Placeholders
98
- Images should be inserted where necessary using:
 
 
99
 
100
  php-template
101
  Copy
102
  Edit
103
  <Direction>: img:<DescriptiveImageName>
104
- <DescriptiveImageName> โ†’ Describe the image clearly for easy attachment later.
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
- Cantina: Roast bot:Roast bot pfp == <Speaker> Let me open the cantina app to talk to Roast bot
120
- Then, the roast bot provides a response.
121
-
122
- Example:
123
- vbnet
 
 
 
 
 
 
 
 
 
 
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> This guy just delivered my food and scammed me ๐Ÿ˜ก
128
- Left: Antoni> Tell him this: "Sir, you pay less than a dollar tip and expect a five-star service?"
129
- Right: Alex> YOU DID ME DIRTY BRO ๐Ÿ˜ญ๐Ÿ˜ญ
130
- 2. STORY GENERATION GUIDELINES
131
- 2.1 Catchy โ€œBrain Rotโ€ Hook
132
- The first few lines must be highly engaging, over-the-top, and create curiosity.
133
- Examples:
134
-
135
- "BRO I JUST ORDERED UBER EATS AND THIS GUY SHOWED UP IN A SPACESHIP???" ๐Ÿš€๐Ÿ‘€
136
- "WHY DID MY DAD JUST SAY HE WANTS TO PLAY GTA WITH ME???" ๐ŸŽฎ๐Ÿ’€
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
- Right: Alex> BRO WTF IS THIS BURGER?! [shocked]
159
- Left: Chinmay> Sir, it's called a **mystery meat special** ๐Ÿ˜Ž
160
- Right: Alex> MYSTERY??? FROM WHAT ANIMAL?!?!
161
- Left: Chinmay> ๐Ÿ˜ถ
162
- 3. PARAMETERS & CUSTOMIZATION OPTIONS
163
- When prompting the AI, specify the following:
164
-
165
- Left and Right Voice Actors โ†’ Who will play each side (e.g., AI voice "John" for left, "Jake" for right).
166
- Story Theme โ†’ Choose a base premise (e.g., "Uber Eats Disaster", "Courtroom Chaos", "Dad Discovers GTA").
167
- Roast Bot Usage โ†’ Include or exclude Roast Bot mechanics.
168
- Emphasis on Images โ†’ How often to generate img: placeholders.
169
- Tone Adjustment โ†’ More meme-heavy or slightly structured comedy.
170
- 4. EXAMPLE PROMPT FOR AI MODEL
171
- Input Example for AI Model:
172
-
173
- markdown
174
  Copy
175
  Edit
176
- Generate an iMessage chat script in this exact format:
177
-
178
- - Contact Name: โ€œAlexโ€™s Lawyer๐Ÿ’€โš–๏ธโ€
179
- - Left Voice: โ€œChinmay (Uber Eats Guy)โ€
180
- - Right Voice: โ€œAlex (Customer)โ€
181
- - Theme: โ€œA lawyer who took the case without reading it.โ€
182
- - Must start with a **crazy brain rot hook**.
183
- - Must include [shocked], [suspense_music], and [explosion] effects.
184
- - Must include **at least 3 images** with descriptive placeholders.
185
- - Include **Roast Bot mechanics**.
186
-
187
- The dialogue should be **random, funny, and full of unexpected twists** while following the format strictly.
188
- 5. FINAL SUMMARY OF FORMATTING
189
- Title: <Contact Name>:<Contact Name>
190
- Dialogue: <Direction>: <Speaker> > <Dialogue> [<Reaction>]
191
- Image Placeholder: <Direction>: img:<DescriptiveImageName> [== <Reaction>]
192
- Cantina App (Roast Bot): Cantina: Roast bot:Roast bot pfp == <Speaker> <Dialogue>
193
- Hooks: Use crazy, meme-heavy openers.
194
- Storyline: Escalates into chaos but stays coherent.
195
- Tone: Casual, funny, meme-heavy, with emojis and sound effects.
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}