Sebastian Cacean
Set share=True
ae898db
from os import path
from loguru import logger
import sys
try:
# Set environment variables for the app
import os
config_file = './app_config.yaml'
if not path.exists(config_file):
logger.error(
f"Demo app configuration file '{config_file}' does not exist. "
)
sys.exit(1)
else:
logger.info(f"Using the following config file: {config_file}")
# Set config path for the app
os.environ["APP_CONFIG_FILE"] = config_file
logger.info("Starting Gradio demo app...")
# Import the demo app
from evidence_seeker.demo_app.app import evse_demo_app
# Launch the app
evse_demo_app.launch(
share=True, # Set to True for public sharing
debug=False, # Set to True for development
show_error=True # Show detailed errors
)
except ImportError as e:
logger.error(f"Failed to import demo app: {e}")
logger.error("Make sure the demo app dependencies are installed.")
sys.exit(1)
except Exception as e:
logger.error(f"Failed to start demo app: {e}")
sys.exit(1)