Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1119,10 +1119,7 @@ class EnhancedVideoGenerator:
|
|
| 1119 |
# Streamlit UI Class
|
| 1120 |
class VideoGeneratorUI:
|
| 1121 |
def __init__(self):
|
| 1122 |
-
self.generator =
|
| 1123 |
-
# Create a base directory for video outputs
|
| 1124 |
-
self.output_base_dir = "generated_videos"
|
| 1125 |
-
os.makedirs(self.output_base_dir, exist_ok=True)
|
| 1126 |
self.setup_ui()
|
| 1127 |
|
| 1128 |
def setup_ui(self):
|
|
@@ -1283,21 +1280,25 @@ class VideoGeneratorUI:
|
|
| 1283 |
timestamp = int(time.time())
|
| 1284 |
output_filename = f"vaultgenix_video_{timestamp}.mp4"
|
| 1285 |
|
| 1286 |
-
# Create
|
| 1287 |
-
output_path = os.path.join(
|
|
|
|
|
|
|
|
|
|
| 1288 |
|
| 1289 |
-
#
|
| 1290 |
-
|
|
|
|
| 1291 |
|
| 1292 |
-
video_path = self.generator.
|
| 1293 |
prompt,
|
| 1294 |
-
|
| 1295 |
duration,
|
| 1296 |
-
output_path
|
| 1297 |
-
selected_images
|
| 1298 |
)
|
| 1299 |
|
| 1300 |
-
if
|
|
|
|
| 1301 |
st.success("✨ Video generated successfully!")
|
| 1302 |
|
| 1303 |
# Display video
|
|
@@ -1557,6 +1558,7 @@ class VideoGenerator:
|
|
| 1557 |
print(f"Cleanup error: {e}")
|
| 1558 |
|
| 1559 |
def create_ui():
|
|
|
|
| 1560 |
st.title("VaultGenix Video Generator")
|
| 1561 |
st.markdown("Create professional videos for your digital legacy management platform")
|
| 1562 |
|
|
|
|
| 1119 |
# Streamlit UI Class
|
| 1120 |
class VideoGeneratorUI:
|
| 1121 |
def __init__(self):
|
| 1122 |
+
self.generator = VideoGenerator()
|
|
|
|
|
|
|
|
|
|
| 1123 |
self.setup_ui()
|
| 1124 |
|
| 1125 |
def setup_ui(self):
|
|
|
|
| 1280 |
timestamp = int(time.time())
|
| 1281 |
output_filename = f"vaultgenix_video_{timestamp}.mp4"
|
| 1282 |
|
| 1283 |
+
# Create absolute output path
|
| 1284 |
+
output_path = os.path.abspath(os.path.join(
|
| 1285 |
+
self.generator.base_dir,
|
| 1286 |
+
output_filename
|
| 1287 |
+
))
|
| 1288 |
|
| 1289 |
+
# Show progress message
|
| 1290 |
+
progress_message = st.empty()
|
| 1291 |
+
progress_message.text("🎥 Generating your video... This may take a few minutes.")
|
| 1292 |
|
| 1293 |
+
video_path = self.generator.generate_video(
|
| 1294 |
prompt,
|
| 1295 |
+
selected_images,
|
| 1296 |
duration,
|
| 1297 |
+
output_path
|
|
|
|
| 1298 |
)
|
| 1299 |
|
| 1300 |
+
if os.path.exists(video_path):
|
| 1301 |
+
progress_message.empty()
|
| 1302 |
st.success("✨ Video generated successfully!")
|
| 1303 |
|
| 1304 |
# Display video
|
|
|
|
| 1558 |
print(f"Cleanup error: {e}")
|
| 1559 |
|
| 1560 |
def create_ui():
|
| 1561 |
+
ui = VideoGeneratorUI()
|
| 1562 |
st.title("VaultGenix Video Generator")
|
| 1563 |
st.markdown("Create professional videos for your digital legacy management platform")
|
| 1564 |
|