Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
swap file paths for urls
Browse files
app.py
CHANGED
@@ -313,11 +313,12 @@ def process_video(video_id: str):
|
|
313 |
try:
|
314 |
#logger.info(f"Processing video with ID: {video_id}")
|
315 |
metadata = load_metadata(video_id)
|
316 |
-
|
|
|
317 |
|
318 |
-
if not os.path.exists(video_path):
|
319 |
-
logger.error(f"Video file not found: {video_path}")
|
320 |
-
return None, "", f"Error: Video file not found for ID {video_id}"
|
321 |
|
322 |
# Character List Table
|
323 |
character_table = """
|
@@ -359,7 +360,7 @@ def process_video(video_id: str):
|
|
359 |
filmstrip_html = create_filmstrip(metadata['scenes'], video_duration)
|
360 |
|
361 |
logger.info("Video processing completed successfully")
|
362 |
-
return
|
363 |
except Exception as e:
|
364 |
logger.exception(f"Error processing video: {str(e)}")
|
365 |
return None, "", f"Error processing video: {str(e)}"
|
|
|
313 |
try:
|
314 |
#logger.info(f"Processing video with ID: {video_id}")
|
315 |
metadata = load_metadata(video_id)
|
316 |
+
video_url = f"https://huggingface.co/spaces/HuggingFaceFV/FineVideo-Explorer/resolve/main/video/{video_id}.mp4"
|
317 |
+
# video_path = os.path.join(video_folder, f"{video_id}.mp4")
|
318 |
|
319 |
+
# if not os.path.exists(video_path):
|
320 |
+
# logger.error(f"Video file not found: {video_path}")
|
321 |
+
# return None, "", f"Error: Video file not found for ID {video_id}"
|
322 |
|
323 |
# Character List Table
|
324 |
character_table = """
|
|
|
360 |
filmstrip_html = create_filmstrip(metadata['scenes'], video_duration)
|
361 |
|
362 |
logger.info("Video processing completed successfully")
|
363 |
+
return video_url, filmstrip_html, additional_data + scenes_output + storylines_output + qa_output + trimming_suggestions_output
|
364 |
except Exception as e:
|
365 |
logger.exception(f"Error processing video: {str(e)}")
|
366 |
return None, "", f"Error processing video: {str(e)}"
|