Spaces:
Runtime error
Runtime error
File size: 1,044 Bytes
80fda88 |
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 38 39 40 41 42 43 44 45 |
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
|