Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -74,7 +74,7 @@ def generate_video(topic, duration_minutes=1):
|
|
| 74 |
Create a simple presentation plan for the topic: "{topic}"
|
| 75 |
|
| 76 |
Requirements:
|
| 77 |
-
- Create
|
| 78 |
- Each slide should have ONE clear, concise message (max 10 words)
|
| 79 |
- Start with a title slide
|
| 80 |
- Include 3-4 key points about the topic
|
|
@@ -82,18 +82,104 @@ Requirements:
|
|
| 82 |
- Keep text simple and readable
|
| 83 |
|
| 84 |
Format your response as:
|
| 85 |
-
Slide 1: [Title text]
|
| 86 |
-
Slide 2: [Key point 1]
|
| 87 |
-
Slide 3: [Key point 2]
|
| 88 |
-
Slide 4: [Key point 3]
|
| 89 |
-
Slide 5: [Conclusion]
|
| 90 |
|
| 91 |
Example for "Python Programming":
|
| 92 |
-
Slide 1
|
| 93 |
-
|
| 94 |
-
|
| 95 |
-
|
| 96 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 97 |
"""
|
| 98 |
|
| 99 |
plan_response = model.generate_content(planning_prompt)
|
|
@@ -167,7 +253,7 @@ with gr.Blocks(title="AI Video Generator", theme=gr.themes.Soft()) as demo:
|
|
| 167 |
gr.Markdown("""
|
| 168 |
# π¬ AI Video Generator (MoviePy Edition)
|
| 169 |
|
| 170 |
-
Generate educational videos using AI and MoviePy!
|
| 171 |
|
| 172 |
**Features:**
|
| 173 |
- π€ AI-powered content generation using Gemini
|
|
|
|
| 74 |
Create a simple presentation plan for the topic: "{topic}"
|
| 75 |
|
| 76 |
Requirements:
|
| 77 |
+
- Create 10-11 slides maximum for {duration_minutes} minute(s)
|
| 78 |
- Each slide should have ONE clear, concise message (max 10 words)
|
| 79 |
- Start with a title slide
|
| 80 |
- Include 3-4 key points about the topic
|
|
|
|
| 82 |
- Keep text simple and readable
|
| 83 |
|
| 84 |
Format your response as:
|
| 85 |
+
Slide 1: [Title text][details in points]
|
| 86 |
+
Slide 2: [Key point 1][details in points]
|
| 87 |
+
Slide 3: [Key point 2][details in points]
|
| 88 |
+
Slide 4: [Key point 3][details in points]
|
| 89 |
+
Slide 5: [Conclusion][details in points]
|
| 90 |
|
| 91 |
Example for "Python Programming":
|
| 92 |
+
Slide 1 β Python Programming Basics
|
| 93 |
+
|
| 94 |
+
What is Python?
|
| 95 |
+
|
| 96 |
+
High-level, general-purpose language
|
| 97 |
+
|
| 98 |
+
Popular for web, data, AI, automation, and more
|
| 99 |
+
|
| 100 |
+
Slide 2 β Why Python?
|
| 101 |
+
|
| 102 |
+
Versatile and widely used in multiple industries
|
| 103 |
+
|
| 104 |
+
Large community and active development
|
| 105 |
+
|
| 106 |
+
Open-source and free to use
|
| 107 |
+
|
| 108 |
+
Slide 3 β Easy to Learn and Read
|
| 109 |
+
|
| 110 |
+
English-like syntax for easy understanding
|
| 111 |
+
|
| 112 |
+
Minimal boilerplate code
|
| 113 |
+
|
| 114 |
+
Example: print("Hello, World!")
|
| 115 |
+
|
| 116 |
+
Slide 4 β Python's Key Features
|
| 117 |
+
|
| 118 |
+
Cross-platform compatibility
|
| 119 |
+
|
| 120 |
+
Large standard library
|
| 121 |
+
|
| 122 |
+
Object-oriented and functional programming support
|
| 123 |
+
|
| 124 |
+
Interactive interpreter
|
| 125 |
+
|
| 126 |
+
Slide 5 β Powerful Libraries Available
|
| 127 |
+
|
| 128 |
+
Data Analysis: NumPy, Pandas
|
| 129 |
+
|
| 130 |
+
Visualization: Matplotlib, Seaborn
|
| 131 |
+
|
| 132 |
+
Web Development: Django, Flask
|
| 133 |
+
|
| 134 |
+
Machine Learning: TensorFlow, PyTorch
|
| 135 |
+
|
| 136 |
+
Slide 6 β Popular Use Cases
|
| 137 |
+
|
| 138 |
+
Web and app development
|
| 139 |
+
|
| 140 |
+
Data science and analytics
|
| 141 |
+
|
| 142 |
+
Artificial intelligence and machine learning
|
| 143 |
+
|
| 144 |
+
Game development
|
| 145 |
+
|
| 146 |
+
Automation and scripting
|
| 147 |
+
|
| 148 |
+
Slide 7 β Great for Beginners
|
| 149 |
+
|
| 150 |
+
Clear documentation and tutorials
|
| 151 |
+
|
| 152 |
+
Friendly learning curve
|
| 153 |
+
|
| 154 |
+
Lots of free resources available online
|
| 155 |
+
|
| 156 |
+
Slide 8 β Tools Youβll Need
|
| 157 |
+
|
| 158 |
+
Python interpreter (python.org)
|
| 159 |
+
|
| 160 |
+
Code editor (VS Code, PyCharm, Sublime Text)
|
| 161 |
+
|
| 162 |
+
Optional: Jupyter Notebook for interactive coding
|
| 163 |
+
|
| 164 |
+
Slide 9 β Start Your Python Journey!
|
| 165 |
+
|
| 166 |
+
Install Python and set up your editor
|
| 167 |
+
|
| 168 |
+
Practice with small programs daily
|
| 169 |
+
|
| 170 |
+
Work on mini-projects to gain confidence
|
| 171 |
+
|
| 172 |
+
Join coding communities for support
|
| 173 |
+
|
| 174 |
+
Slide 10 β Resources to Learn Python
|
| 175 |
+
|
| 176 |
+
Official Python documentation
|
| 177 |
+
|
| 178 |
+
FreeCodeCamp, Real Python, W3Schools
|
| 179 |
+
|
| 180 |
+
Online coding platforms (HackerRank, LeetCode)
|
| 181 |
+
|
| 182 |
+
|
| 183 |
"""
|
| 184 |
|
| 185 |
plan_response = model.generate_content(planning_prompt)
|
|
|
|
| 253 |
gr.Markdown("""
|
| 254 |
# π¬ AI Video Generator (MoviePy Edition)
|
| 255 |
|
| 256 |
+
Generate educational videos using AI and MoviePy!
|
| 257 |
|
| 258 |
**Features:**
|
| 259 |
- π€ AI-powered content generation using Gemini
|