76 lines
2 KiB
Text
76 lines
2 KiB
Text
{
|
|
"cells": [
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "27e68f91",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"# ===========================================\n",
|
|
"# Setup: Clone repo and run setup\n",
|
|
"# ===========================================\n",
|
|
"\n",
|
|
"# Clone repository with GitHub token\n",
|
|
"import os\n",
|
|
"github_token = os.environ.get('GITHUB_TOKEN', '')\n",
|
|
"if github_token:\n",
|
|
" !git clone -b feature/colab-notebook https://{github_token}@github.com/unslothai/new-ui-prototype.git\n",
|
|
"else:\n",
|
|
" !git clone -b feature/colab-notebook https://github.com/unslothai/new-ui-prototype.git\n",
|
|
"%cd /content/new-ui-prototype\n",
|
|
"\n",
|
|
"# Run setup script\n",
|
|
"!chmod +x setup.sh\n",
|
|
"!./setup.sh"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "26b0e164",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"# ===========================================\n",
|
|
"# GitHub Authentication (Private Repo)\n",
|
|
"# ===========================================\n",
|
|
"from getpass import getpass\n",
|
|
"import os\n",
|
|
"\n",
|
|
"print(\"🔐 GitHub Token Required\")\n",
|
|
"print(\"Get token: https://github.com/settings/tokens\")\n",
|
|
"print(\"Scope needed: 'repo'\")\n",
|
|
"print(\"-\" * 50)\n",
|
|
"\n",
|
|
"github_token = getpass(\"Enter GitHub Token: \")\n",
|
|
"os.environ['GITHUB_TOKEN'] = github_token\n",
|
|
"print(\"✅ Token stored\")"
|
|
]
|
|
},
|
|
{
|
|
"cell_type": "code",
|
|
"execution_count": null,
|
|
"id": "277e431e",
|
|
"metadata": {},
|
|
"outputs": [],
|
|
"source": [
|
|
"# ===========================================\n",
|
|
"# Start Unsloth Studio\n",
|
|
"# ===========================================\n",
|
|
"import sys\n",
|
|
"sys.path.insert(0, '/content/new-ui-prototype/studio/backend')\n",
|
|
"\n",
|
|
"from colab import start\n",
|
|
"start()"
|
|
]
|
|
}
|
|
],
|
|
"metadata": {
|
|
"language_info": {
|
|
"name": "python"
|
|
}
|
|
},
|
|
"nbformat": 4,
|
|
"nbformat_minor": 5
|
|
}
|