CatPtain's picture
Upload 44 files
80fda88 verified
import os
import toml
from loguru import logger
# Minimal config structure
def get_default_config():
return {
"app": {
"max_concurrent_tasks": 1,
"api_enabled": True,
"llm_provider": "deepseek"
},
"ui": {
"hide_log": False,
"language": "zh-CN"
}
}
# Try to load config, fallback to defaults
try:
root_dir = os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__))))
config_file = f"{root_dir}/config.toml"
if os.path.exists(config_file):
_cfg = toml.load(config_file)
else:
_cfg = get_default_config()
except Exception:
_cfg = get_default_config()
# Simple config objects
app = _cfg.get("app", {})
ui = _cfg.get("ui", {})
azure = _cfg.get("azure", {})
siliconflow = _cfg.get("siliconflow", {})
# Basic project info
project_name = "MoneyPrinterTurbo"
project_version = "1.2.6"
project_description = "AI Video Generator"
def save_config():
"""Minimal save function"""
pass