official.ghost.logic
Fix GPU decorator placement - use simple dummy function
f0e06a6
#!/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()