利用 AI 大模型和自动化工作流,根据主题或关键词一键生成高清短视频。Generate HD short videos from a topic or keyword with an automated AI workflow.
Python ai-video-generatorcontent-creationffmpeginstagram-reelsllmpythonshort-videosubtitlestext-to-speechtiktokvideo-automationvideo-workflowworkflow-automationyoutube-shorts
Fix Colab notebook: add missing imports and correct REPO_DIR path
Frio Node4a7a224d8c3c
diff --git a/docs/MoneyPrinterTurbo.ipynb b/docs/MoneyPrinterTurbo.ipynbindex d21305a4..cbf6c2af 100644--- a/docs/MoneyPrinterTurbo.ipynb+++ b/docs/MoneyPrinterTurbo.ipynb@@ -108,9 +108,20 @@"outputs": [],"source": ["import time\n",+ "from pathlib import Path\n",+ "import subprocess\n","from urllib.error import URLError\n","from urllib.request import urlopen\n","\n",+ "from pyngrok import ngrok\n",+ "\n",+ "# Sanity checks before starting\n",+ "REPO_DIR = Path(\"/content/MoneyPrinterTurbo\")\n",+ "if not REPO_DIR.is_dir():\n",+ " raise RuntimeError(f\"Repo directory does not exist: {REPO_DIR}\")\n",+ "if not (REPO_DIR / \"webui\" / \"Main.py\").is_file():\n",+ " raise RuntimeError(f\"webui/Main.py not found in {REPO_DIR}\")\n",+ "\n","PORT = 8501\n","LOG_PATH = Path(\"/content/moneyprinterturbo-webui.log\")\n","\n",@@ -122,7 +133,11 @@"previous_streamlit_log = globals().get(\"streamlit_log\")\n","if previous_streamlit_log is not None and not previous_streamlit_log.closed:\n"," previous_streamlit_log.close()\n",- "ngrok.kill()\n",+ "\n",+ "try:\n",+ " ngrok.kill()\n",+ "except Exception:\n",+ " pass\n","\n","streamlit_log = LOG_PATH.open(\"w\", encoding=\"utf-8\")\n","streamlit_proc = subprocess.Popen(\n",