Update app.py
Browse files
app.py
CHANGED
|
@@ -88,15 +88,16 @@ def generate_animation():
|
|
| 88 |
self.wait()
|
| 89 |
|
| 90 |
# Directory to save rendered video
|
| 91 |
-
output_dir = "/tmp/manim_output"
|
| 92 |
-
os.makedirs(output_dir, exist_ok=True)
|
| 93 |
|
| 94 |
# Rendering the scene to a video file
|
| 95 |
scene = PointMovingOnShapes()
|
| 96 |
-
scene.render(directory=output_dir)
|
|
|
|
| 97 |
|
| 98 |
# Path to the rendered video file (Manim saves as .mp4)
|
| 99 |
-
video_path = os.path.join(
|
| 100 |
|
| 101 |
if os.path.exists(video_path):
|
| 102 |
try:
|
|
|
|
| 88 |
self.wait()
|
| 89 |
|
| 90 |
# Directory to save rendered video
|
| 91 |
+
# output_dir = "/tmp/manim_output"
|
| 92 |
+
# os.makedirs(output_dir, exist_ok=True)
|
| 93 |
|
| 94 |
# Rendering the scene to a video file
|
| 95 |
scene = PointMovingOnShapes()
|
| 96 |
+
# scene.render(directory=output_dir)
|
| 97 |
+
scene.render()
|
| 98 |
|
| 99 |
# Path to the rendered video file (Manim saves as .mp4)
|
| 100 |
+
video_path = os.path.join("/tmp/", "media", "videos", "PointMovingOnShapes", "1080p60", "PointMovingOnShapes.mp4")
|
| 101 |
|
| 102 |
if os.path.exists(video_path):
|
| 103 |
try:
|