updated notebooks to use the new "main" setup

This commit is contained in:
mrq 2023-02-17 03:31:19 +00:00
parent 150138860c
commit b255a77a05

View File

@ -71,16 +71,29 @@
{
"cell_type":"code",
"source":[
"%cd ai-voice-cloning\n",
"import src.webui as mrq\n",
"import sys\n",
"sys.argv = [\"\"]\n",
"%cd /content/ai-voice-cloning\n",
"\n",
"mrq.args = mrq.setup_args()\n",
"mrq.webui = mrq.setup_gradio()\n",
"mrq.tts = mrq.setup_tortoise()\n",
"mrq.webui.launch(share=True, prevent_thread_lock=True, height=1000)\n",
"mrq.webui.block_thread()"
"import os\n",
"import sys\n",
"\n",
"sys.argv = [\"\"]\n",
"sys.path.append('./src/')\n",
"\n",
"if 'TORTOISE_MODELS_DIR' not in os.environ:\n",
"\tos.environ['TORTOISE_MODELS_DIR'] = os.path.realpath(os.path.join(os.getcwd(), './models/tortoise/'))\n",
"\n",
"if 'TRANSFORMERS_CACHE' not in os.environ:\n",
"\tos.environ['TRANSFORMERS_CACHE'] = os.path.realpath(os.path.join(os.getcwd(), './models/transformers/'))\n",
"\n",
"from utils import *\n",
"from webui import *\n",
"\n",
"args = setup_args()\n",
"\n",
"webui = setup_gradio()\n",
"tts = setup_tortoise()\n",
"webui.launch(share=True, prevent_thread_lock=True, height=1000)\n",
"webui.block_thread()"
],
"metadata":{
"id":"c_EQZLTA19c7"
@ -102,6 +115,7 @@
{
"cell_type":"code",
"source":[
"%cd /content/ai-voice-cloning\n",
"!apt install -y p7zip-full\n",
"from datetime import datetime\n",
"timestamp = datetime.now().strftime('%m-%d-%Y_%H:%M:%S')\n",