tsi-org commited on
Commit
65fe779
·
verified ·
1 Parent(s): 456e49d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +13 -11
app.py CHANGED
@@ -130,18 +130,20 @@ def main():
130
  option = st.selectbox('Choose the voice you want', ('Female Voice', 'Male Voice'))
131
  classify = 'alloy' if option == 'Male Voice' else 'nova'
132
 
133
- if uploaded_file is not None:
 
134
  st.video(uploaded_file)
135
- prompt = st.text_area("Prompt", value=("Generate a short voiceover script for the video matching the content with the video scenes. "
136
- "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. "
137
- "The narration should be informative, engaging, and tailored to an audience seeking to learn from the video content. For each frame, the voiceover script should: "
138
- "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. "
139
- "- 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. "
140
- "- Highlight important details or features within the frame that the audience should pay attention to, explaining their significance in the context of the tutorial. "
141
- "- Include questions or prompts when appropriate to encourage viewer engagement and reflection on the material presented. "
142
- "- Where applicable, draw connections between the content in the current frame and previous frames to build a cohesive narrative or instructional flow. "
143
- "- 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. "
144
- "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."))
 
145
  if st.button("START PROCESSING", type="primary"):
146
  with st.spinner("Video is being processed..."):
147
  base64Frame, video_filename, video_duration = video_to_frames(uploaded_file, frame_sampling_rate=1)
 
130
  option = st.selectbox('Choose the voice you want', ('Female Voice', 'Male Voice'))
131
  classify = 'alloy' if option == 'Male Voice' else 'nova'
132
 
133
+ # Assuming the previous code is correctly indented, ensure this block matches
134
+ if uploaded_file is not None:
135
  st.video(uploaded_file)
136
+ prompt = st.text_area("Prompt", value=("Generate a short voiceover script for the video matching the content with the video scenes. "
137
+ "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. "
138
+ "The narration should be informative, engaging, and tailored to an audience seeking to learn from the video content. For each frame, the voiceover script should: "
139
+ "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. "
140
+ "- 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. "
141
+ "- Highlight important details or features within the frame that the audience should pay attention to, explaining their significance in the context of the tutorial. "
142
+ "- Include questions or prompts when appropriate to encourage viewer engagement and reflection on the material presented. "
143
+ "- Where applicable, draw connections between the content in the current frame and previous frames to build a cohesive narrative or instructional flow. "
144
+ "- 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. "
145
+ "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."))
146
+
147
  if st.button("START PROCESSING", type="primary"):
148
  with st.spinner("Video is being processed..."):
149
  base64Frame, video_filename, video_duration = video_to_frames(uploaded_file, frame_sampling_rate=1)