Spaces:
Sleeping
Sleeping
| #!/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 | |
| 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() | |