#!/usr/bin/env python3 """ D'n'D Campaign Manager - Main Application Launch the Gradio UI for character creation """ import sys from pathlib import Path import spaces # Add src to path sys.path.insert(0, str(Path(__file__).parent)) from src.ui import launch_ui # Dummy function to satisfy HF Spaces GPU detection # This app uses API calls (Anthropic/OpenAI/Google) so no local GPU needed @spaces.GPU def dummy_gpu_function(): """Placeholder to satisfy HF Spaces ZeroGPU requirement""" pass if __name__ == "__main__": # Call dummy GPU function to register it dummy_gpu_function() print(""" ╔═══════════════════════════════════════════════╗ ║ 🎲 D'n'D Campaign Manager ║ ║ Complete D&D Character Creator ║ ╚═══════════════════════════════════════════════╝ Starting Gradio interface... """) try: launch_ui() except KeyboardInterrupt: print("\n\n👋 Shutting down gracefully...") except Exception as e: print(f"\n❌ Error: {e}") import traceback traceback.print_exc()