Spaces:
Runtime error
Runtime error
File size: 614 Bytes
4f038ca | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | # media_utils.py
import streamlit as st
from text_to_scene import generate_scene
from text_to_video import generate_video
def run_media_generation(input_data, feature, additional_context=None):
try:
if feature == "Text to Scene":
return generate_scene(input_data, additional_context)
elif feature == "Text to Video":
return generate_video(input_data, additional_context)
else:
raise ValueError(f"Unsupported feature: {feature}")
except Exception as e:
st.error(f"Error in media generation: {str(e)}")
return None |