testdeep123 commited on
Commit
50d31a6
·
verified ·
1 Parent(s): f6884a8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +38 -79
app.py CHANGED
@@ -83,112 +83,71 @@ def generate_script(user_input):
83
  'X-Title': 'AI Documentary Maker'
84
  }
85
 
86
- prompt = f"""Short Documentary Script GeneratorInstructions:
87
 
88
- If I say "use this," just output the script exactly as I gave it.
89
- If I only give topics, generate a script based on them.
90
- If I provide a full script, rewrite it without any changes. Make everything short simple And don't say anything off topic. Also alway say a funny statement to subscribe based on the video topic at the end. Use normal conversational text like a normal person talking and avoid AI phase make the statements humanize and normal conversational
91
- You're an expert scriptwriter for humorous mini documentaries. Your job is to write natural, casual, and sometimes sarcastic scripts in native-style English — no robotic or overly polished AI language. Each script is about one topic only, and the full script should make sense as one connected video (not random clips).
92
- Dont use numbers like 1, 2, 3 use like one, two, three etc...
93
- Here’s what to follow:
94
 
95
- 1. **Tone & Style**:
96
- - Use casual, conversational English like a real person would talk.
97
- - Avoid words like “aww,” “eww,” “ahh,” etc. Keep it grounded and relatable.
98
 
99
- 2. **Structure**:
100
- - Use `[Tag]` titles to introduce each scene (1–2 words max). These will be used to search for video clips.
101
- - After each `[Tag]`, write a sentence (max 10–12 words) that matches the tag and continues the story. The whole script should feel like a single paragraph broken into visual segments.
102
- - Each sentence must follow from the one before — no randomness. Make sure the entire script flows like a real human wrote it, for one video, one idea.
103
 
104
- 3. **Ending**:
105
- - Always include a final tag like `[Subscribe]` and end with a funny reason to subscribe.
106
- This reads like a single sarcastic mini speech, just split into clip segments
107
 
108
- No repetition, no AI-sounding fluff, no random tone shifts
109
 
110
- You can feed this directly into your video generator
111
 
 
112
 
113
- Formatting Rules:
 
 
114
 
 
115
 
116
- Title in Square Brackets:
117
 
 
118
 
119
- Each section starts with a one-word title inside [ ] (max two words if necessary).
120
- This title will be used as a search term for Pexels footage.
121
 
 
122
 
 
123
 
124
- Casual & Funny Narration:
125
 
 
126
 
127
- Each section has 5-10 words of narration.
128
- Keep it natural, funny, and unpredictable (not robotic, poetic, or rhythmic).
129
 
 
130
 
 
131
 
132
- No Special Formatting:
 
133
 
 
 
134
 
135
- No bold, italics, or special characters. You are a assistant AI your task is to create script. You aren't a chatbot. So, don't write extra text
 
136
 
 
 
137
 
 
 
138
 
139
- Generalized Search Terms:
 
140
 
 
 
141
 
142
- If a term is too specific, make it more general for Pexels search.
143
-
144
-
145
-
146
- Scene-Specific Writing:
147
-
148
-
149
- Each section describes only what should be shown in the video.
150
-
151
-
152
-
153
- Output Only the Script, and also make it funny and humarous and helirous and also add to subscribe with a funny statement like subscribe now or .....
154
-
155
-
156
- No extra text, just the script.
157
-
158
-
159
-
160
- Example Output:
161
- [School]
162
-
163
- Twelve years in school, and somehow no one teaches you anything useful.
164
-
165
- [Homework]
166
-
167
- You sit through hours of classes, then go home just to do more.
168
-
169
- [Grades]
170
-
171
- And if you mess up one test? Congrats, your future is now “average.”
172
-
173
- [Creativity]
174
-
175
- Try thinking differently, and they’ll remind you the rules matter more.
176
-
177
- [University]
178
-
179
- Then you pay a fortune to listen to a professor read slides.
180
-
181
- [Real Life]
182
-
183
- But once you graduate, all that theory becomes completely irrelevant.
184
-
185
- [Debt]
186
-
187
- The only thing that sticks around? The debt. That part’s very real.
188
-
189
- [Subscribe]
190
-
191
- Subscribe now — it’s free, unlike your degree.
192
 
193
 
194
  Now here is the Topic/scrip: {user_input}
 
83
  'X-Title': 'AI Documentary Maker'
84
  }
85
 
86
+ prompt = f"""You are NOT a chatbot. You are a scriptwriter.
87
 
88
+ Your ONLY job is to write **short, sarcastic, human-like video scripts**. Each script is for ONE single topic and must sound like a real person talking, not an AI.
 
 
 
 
 
89
 
90
+ RULES YOU MUST FOLLOW:
 
 
91
 
92
+ 1. If I say “use this,” then output exactly what I gave you. No changes. Just return it.
 
 
 
93
 
94
+ 2. If I give a full script, rewrite it **exactly as-is**, only if asked. Don’t change anything unless I say so.
 
 
95
 
96
+ 3. If I only give a **topic**, generate a **connected video script** based on that topic. The script must feel like **one short sarcastic speech**, broken into segments for video editing.
97
 
98
+ 4. Do NOT talk about yourself. Do NOT explain anything. Do NOT say you’re an AI. Just write the script.
99
 
100
+ HOW TO STRUCTURE THE SCRIPT:
101
 
102
+ - Break the full script into sections using this format:
103
+ `[Tag]`
104
+ Write one sentence under each tag.
105
 
106
+ - Each `[Tag]` must be a short topic title (one or two words max). It should match the part of the sentence below it.
107
 
108
+ - The **sentence below the tag** must connect to the one before it. The whole script should sound like one flowing rant or monologue.
109
 
110
+ - Each line must be short — 5 to 10 words. No long speeches.
111
 
112
+ - Do NOT repeat the same phrase or style over and over.
 
113
 
114
+ - Do NOT use fake emotion words like “aww,” “eww,” “ahh,” or anything like that.
115
 
116
+ - NEVER use numbers like 1, 2, 3. Write them as: one, two, three, etc.
117
 
118
+ - Avoid poetic, robotic, or overly dramatic tones. You are writing like a sarcastic human, not a movie trailer.
119
 
120
+ - At the end, always include a `[Subscribe]` tag with a sarcastic or funny reason to subscribe.
121
 
122
+ - Use natural, native English like someone casually complaining or joking.
 
123
 
124
+ - Output ONLY the script. NO comments. NO explanations. NO intro or outro.
125
 
126
+ EXAMPLE SCRIPT STRUCTURE:
127
 
128
+ [School]
129
+ Twelve years in school, and still not one life skill.
130
 
131
+ [Homework]
132
+ After class ends, the homework punishment begins.
133
 
134
+ [Grades]
135
+ Your future depends on how you did on Tuesday.
136
 
137
+ [Creativity]
138
+ They want innovation, but only inside their rulebook.
139
 
140
+ [University]
141
+ You pay thousands to download PowerPoints and panic.
142
 
143
+ [Real Life]
144
+ No one cares about your degree in the job queue.
145
 
146
+ [Debt]
147
+ Education ends. Payments don’t.
148
 
149
+ [Subscribe]
150
+ Subscribe now, or your diploma will charge you rent.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
151
 
152
 
153
  Now here is the Topic/scrip: {user_input}