Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,16 @@ import moviepy.editor as mp
|
|
16 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
17 |
logger = logging.getLogger(__name__)
|
18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
19 |
# Initialize the Dash app
|
20 |
app = Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
|
21 |
|
|
|
16 |
logging.basicConfig(level=logging.INFO, format='%(asctime)s - %(levelname)s - %(message)s')
|
17 |
logger = logging.getLogger(__name__)
|
18 |
|
19 |
+
try:
|
20 |
+
import moviepy.editor as mp
|
21 |
+
# Initialize moviepy
|
22 |
+
mp.config.change_settings({"FFMPEG_BINARY": "ffmpeg"})
|
23 |
+
logger.info("Moviepy successfully imported and initialized")
|
24 |
+
except ImportError as e:
|
25 |
+
logger.error(f"Error importing moviepy: {str(e)}")
|
26 |
+
logger.error("Please ensure moviepy is installed correctly")
|
27 |
+
raise
|
28 |
+
|
29 |
# Initialize the Dash app
|
30 |
app = Dash(__name__, external_stylesheets=[dbc.themes.BOOTSTRAP])
|
31 |
|