Skip to content

Instantly share code, notes, and snippets.

@zgohr
Last active July 26, 2023 17:40
Show Gist options
  • Save zgohr/63370f847e1334514221c6555f90056a to your computer and use it in GitHub Desktop.
Save zgohr/63370f847e1334514221c6555f90056a to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"\n",
"!git clone https://github.com/oobabooga/text-generation-webui/\n",
"%cd text-generation-webui\n",
"!pip install -r requirements.txt\n",
"\n",
"!mkdir -p /workspace/text-generation-webui/repositories\n",
"%cd /workspace/text-generation-webui/repositories\n",
"!git clone https://github.com/turboderp/exllama\n",
"!pip install -r exllama/requirements.txt\n",
"\n",
"print(\"Finished installing dependencies.\")\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!pip install --ignore-installed git+https://github.com/mnt4/flask-cloudflared"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"%cd /workspace/text-generation-webui/\n",
"cmd = f\"python server.py --listen --share --public-api --api\"\n",
"!$cmd\n",
"\n",
"print(\"Wait a few seconds for the server to start. Due to a bug in flask-cloudflared, you currently need to stop and restart this cell once to get the API urls to work. It will give 3 URLs. Gradio is the Ooba UI.\")"
]
}
],
"metadata": {
"language_info": {
"name": "python"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment