-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstart-OneTrainerUI.py
More file actions
executable file
·37 lines (31 loc) · 844 Bytes
/
start-OneTrainerUI.py
File metadata and controls
executable file
·37 lines (31 loc) · 844 Bytes
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
30
31
32
33
34
35
36
37
#!/usr/bin/env python3
"""
Simple launcher for OneTrainer UI
"""
import os
import sys
import importlib.util
# Add the current directory to the path
current_dir = os.path.dirname(os.path.abspath(__file__))
if current_dir not in sys.path:
sys.path.insert(0, current_dir)
# Banner
print("=== OneTrainer with DearPyGui ===")
# Check if DearPyGui is installed
try:
import dearpygui
print(f"DearPyGui version: {getattr(dearpygui, '__version__', 'unknown')}")
except ImportError:
print("DearPyGui is not installed. Please run fix_and_run_ui.sh")
sys.exit(1)
# Very simple error handling
try:
# Import and run the application
from dpg_ui.app import OneTrainerApp
app = OneTrainerApp()
app.run()
except Exception as e:
print(f"Error: {e}")
import traceback
traceback.print_exc()
sys.exit(1)