Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -167,19 +167,22 @@ def main():
|
|
167 |
duration_options = list(range(10, 121, 10)) # 10 to 120 seconds, in 10 second intervals
|
168 |
selected_duration = st.selectbox('Select the desired video duration (seconds)', duration_options)
|
169 |
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
|
|
|
|
|
|
183 |
|
184 |
# if uploaded_file is not None:
|
185 |
# st.video(uploaded_file)
|
|
|
167 |
duration_options = list(range(10, 121, 10)) # 10 to 120 seconds, in 10 second intervals
|
168 |
selected_duration = st.selectbox('Select the desired video duration (seconds)', duration_options)
|
169 |
|
170 |
+
# Generate initial prompt text with dynamic content
|
171 |
+
dynamic_prompt_intro = f"Generate a short voiceover script that is approximately {selected_duration} seconds long, matching the content with the video scenes."
|
172 |
+
static_prompt_body = (" The app is called AI Tutor. The style should be fun and engaging. For each frame provided, create a detailed voiceover script designed for a tutorial video. "
|
173 |
+
"Never say 'Female 2' or 'VoiceOver' in responses. You output a script to be spoken! - Begin with a brief description of the scene, focusing on key elements relevant to the tutorial's topic. "
|
174 |
+
"- Provide step-by-step instructions or explanations for any actions, processes, or concepts shown in the frame. Use clear and concise language suitable for educational content. "
|
175 |
+
"- Highlight important details or features within the frame that the audience should pay attention to, explaining their significance in the context of the tutorial. "
|
176 |
+
"- Include questions or prompts when appropriate to encourage viewer engagement and reflection on the material presented. "
|
177 |
+
"- Where applicable, draw connections between the content in the current frame and previous frames to build a cohesive narrative or instructional flow. "
|
178 |
+
"- End with a short summary or teaser of what to expect next, maintaining the viewer’s interest and facilitating a smooth transition between sections of the tutorial. "
|
179 |
+
"The goal is to transform the visual information into an accessible and compelling educational narrative that enhances the viewer's understanding and retention of the subject matter.")
|
180 |
+
|
181 |
+
initial_prompt = dynamic_prompt_intro + static_prompt_body
|
182 |
+
|
183 |
+
# Allow the user to edit the prompt
|
184 |
+
prompt = st.text_area("Edit the voiceover script prompt as needed:", value=initial_prompt, height=300)
|
185 |
+
|
186 |
|
187 |
# if uploaded_file is not None:
|
188 |
# st.video(uploaded_file)
|