import streamlit as st import os import sys # Add root directory to path root_dir = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) if root_dir not in sys.path: sys.path.append(root_dir) # Minimal page config st.set_page_config( page_title="MoneyPrinterTurbo", page_icon="🎬", layout="wide" ) st.title("🎬 MoneyPrinterTurbo") st.write("AI驱动的短视频生成工具") # Simple status check try: # Try to import core modules from app.config import config st.success("✅ 核心模块加载成功") # Basic configuration panel with st.expander("⚙️ 基础配置", expanded=True): col1, col2 = st.columns(2) with col1: st.subheader("LLM 配置") llm_provider = st.selectbox("选择 LLM 提供商", ["DeepSeek", "Moonshot", "OpenAI"]) api_key = st.text_input(f"{llm_provider} API Key", type="password") with col2: st.subheader("视频素材源") video_source = st.selectbox("选择视频源", ["Pexels", "Pixabay"]) video_api_key = st.text_input(f"{video_source} API Key", type="password") # Simple video generation form st.subheader("🎥 生成视频") video_subject = st.text_input("视频主题", placeholder="例如:春天的花海") if st.button("🚀 开始生成", type="primary", disabled=not video_subject): if not api_key or not video_api_key: st.error("请先配置 API 密钥") else: st.info("功能开发中...") st.balloons() except ImportError as e: st.error(f"❌ 模块加载失败: {e}") st.info("请检查依赖安装是否完整") except Exception as e: st.error(f"❌ 启动错误: {e}") # Show environment info with st.sidebar: st.subheader("📊 系统信息") st.write(f"Python: {sys.version.split()[0]}") st.write(f"工作目录: {os.getcwd()}") if st.button("🔄 重新加载"): st.rerun()