mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
Revert colab changes
This commit is contained in:
@@ -55,8 +55,8 @@
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"metadata": {
|
||||
"cellView": "form",
|
||||
"id": "hps3qtPLFNBb"
|
||||
"id": "hps3qtPLFNBb",
|
||||
"cellView": "form"
|
||||
},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
@@ -67,7 +67,6 @@
|
||||
"Version = \"Official\" \n",
|
||||
"KoboldAI_Provider = \"Localtunnel\" #@param [\"Localtunnel\", \"Cloudflare\"]\n",
|
||||
"use_google_drive = True #@param {type:\"boolean\"}\n",
|
||||
"extras_enable_captioning = False #@param {type:\"boolean\"}\n",
|
||||
"Provider = KoboldAI_Provider\n",
|
||||
"!nvidia-smi\n",
|
||||
"import subprocess\n",
|
||||
@@ -160,45 +159,6 @@
|
||||
" if \"INIT\" in line and \"Transformers\" in line:\n",
|
||||
" print(\"Model loading... (It will take 2 - 5 minutes)\")\n",
|
||||
"\n",
|
||||
"ShareParam = \"--share\" if Provider == \"Cloudflare\" else \"\"\n",
|
||||
"ExtrasModules = []\n",
|
||||
"\n",
|
||||
"if (extras_enable_captioning):\n",
|
||||
" ExtrasModules.append('caption')\n",
|
||||
"\n",
|
||||
"ModulesParam = f'--enable-modules={\",\".join(ExtrasModules)}'\n",
|
||||
"\n",
|
||||
"#TavernAI extras\n",
|
||||
"%cd /\n",
|
||||
"!git clone https://github.com/SillyLossy/TavernAI-extras\n",
|
||||
"%cd TavernAI-extras\n",
|
||||
"!pip install -r requirements.txt\n",
|
||||
"!pip install -U tensorflow==2.9.2\n",
|
||||
"extras_process = subprocess.Popen(['python', '/TavernAI-extras/server.py', '--cpu', ShareParam, ModulesParam], stdout=subprocess.PIPE, stderr=subprocess.PIPE, cwd='/TavernAI-extras')\n",
|
||||
"print('processId:', extras_process.pid)\n",
|
||||
"\n",
|
||||
"while True:\n",
|
||||
" line = extras_process.stdout.readline().decode().strip()\n",
|
||||
" err_line = '\\n'.join([line.decode().strip() for line in extras_process.stderr.readlines()])\n",
|
||||
" if err_line:\n",
|
||||
" print(err_line)\n",
|
||||
" if \"Running on \" in line and Provider != \"Cloudflare\":\n",
|
||||
" print(\"TavernAI Extras URL:\")\n",
|
||||
" print('')\n",
|
||||
" break\n",
|
||||
" if \"Running on \" in line and Provider == \"Cloudflare\" and \"trycloudflare.com\" in line:\n",
|
||||
" print(\"TavernAI Extras URL:\")\n",
|
||||
" extras_url = line.split(\"Running on \")[1]\n",
|
||||
" print(extras_url)\n",
|
||||
" print('')\n",
|
||||
" break\n",
|
||||
" if not line:\n",
|
||||
" print('breaking on line')\n",
|
||||
" break\n",
|
||||
" print(line)\n",
|
||||
"\n",
|
||||
"!lt --port 5100\n",
|
||||
"print('')\n",
|
||||
"\n",
|
||||
"#TavernAI\n",
|
||||
"%cd /\n",
|
||||
@@ -206,7 +166,7 @@
|
||||
"!nvm install 19.1.0\n",
|
||||
"!nvm use 19.1.0\n",
|
||||
"!node -v\n",
|
||||
"!git clone -b dev https://github.com/SillyLossy/TavernAI\n",
|
||||
"!git clone https://github.com/TavernAI/TavernAIColab\n",
|
||||
"copy_characters(use_google_drive)\n",
|
||||
"%cd TavernAIColab\n",
|
||||
"!npm install\n",
|
||||
@@ -226,7 +186,6 @@
|
||||
}
|
||||
],
|
||||
"metadata": {
|
||||
"accelerator": "GPU",
|
||||
"colab": {
|
||||
"provenance": []
|
||||
},
|
||||
@@ -237,8 +196,9 @@
|
||||
},
|
||||
"language_info": {
|
||||
"name": "python"
|
||||
}
|
||||
},
|
||||
"accelerator": "GPU"
|
||||
},
|
||||
"nbformat": 4,
|
||||
"nbformat_minor": 0
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user