File size: 792 Bytes
8daf03a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
import os
import sys
import logging
# Configure logging
logging.basicConfig(
level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
handlers=[logging.StreamHandler(sys.stdout)]
)
logger = logging.getLogger("faceforge_app")
# Add the project root to the Python path
sys.path.insert(0, os.path.abspath(os.path.dirname(__file__)))
try:
logger.info("Starting FaceForge app")
# Import the demo from the UI module
from faceforge_ui.app import demo
# Launch the app
if __name__ == "__main__":
logger.info("Launching Gradio interface")
demo.launch(server_name="0.0.0.0")
except Exception as e:
logger.critical(f"Failed to start app: {e}")
import traceback
logger.debug(traceback.format_exc())
raise |