Minor fixes
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"execution_count": null,
|
||||
"id": "c44c5494-950d-4d2f-8d4f-b87b57c5b330",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -35,7 +35,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"execution_count": null,
|
||||
"id": "d1715421-cead-400b-99af-986388a97aff",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -45,20 +45,10 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"execution_count": null,
|
||||
"id": "337d5dfc-0181-4e3b-8ab9-e78e0c3f657b",
|
||||
"metadata": {},
|
||||
"outputs": [
|
||||
{
|
||||
"name": "stdout",
|
||||
"output_type": "stream",
|
||||
"text": [
|
||||
"OpenAI API Key exists and begins sk-proj-\n",
|
||||
"Anthropic API Key exists and begins sk-ant-\n",
|
||||
"Google API Key exists and begins AIzaSyA5\n"
|
||||
]
|
||||
}
|
||||
],
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# Load environment variables in a file called .env\n",
|
||||
"# Print the key prefixes to help with any debugging\n",
|
||||
@@ -86,7 +76,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"execution_count": null,
|
||||
"id": "22586021-1795-4929-8079-63f5bb4edd4c",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -102,7 +92,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"execution_count": null,
|
||||
"id": "b16e6021-6dc4-4397-985a-6679d6c8ffd5",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -114,7 +104,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"execution_count": null,
|
||||
"id": "02ef9b69-ef31-427d-86d0-b8c799e1c1b1",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
@@ -292,7 +282,7 @@
|
||||
"# Let's use Markdown\n",
|
||||
"# Are you wondering why it makes any difference to set system_message when it's not referred to in the code below it?\n",
|
||||
"# I'm taking advantage of system_message being a global variable, used back in the message_gpt function (go take a look)\n",
|
||||
"# Not a great software engineering practice, but quite sommon during Jupyter Lab R&D!\n",
|
||||
"# Not a great software engineering practice, but quite common during Jupyter Lab R&D!\n",
|
||||
"\n",
|
||||
"system_message = \"You are a helpful assistant that responds in markdown\"\n",
|
||||
"\n",
|
||||
@@ -578,7 +568,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.11"
|
||||
"version": "3.11.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
@@ -748,7 +748,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.11"
|
||||
"version": "3.11.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
@@ -475,7 +475,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.11"
|
||||
"version": "3.11.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
@@ -429,7 +429,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.11"
|
||||
"version": "3.11.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
@@ -43,7 +43,6 @@
|
||||
"from dotenv import load_dotenv\n",
|
||||
"from huggingface_hub import login\n",
|
||||
"from datasets import load_dataset, Dataset, DatasetDict\n",
|
||||
"from loaders import ItemLoader\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"from collections import Counter, defaultdict\n",
|
||||
"import numpy as np\n",
|
||||
@@ -85,8 +84,9 @@
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# One more import after HF login\n",
|
||||
"# More imports after HF login\n",
|
||||
"\n",
|
||||
"from loaders import ItemLoader\n",
|
||||
"from items import Item"
|
||||
]
|
||||
},
|
||||
@@ -624,7 +624,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.11"
|
||||
"version": "3.11.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
@@ -918,7 +918,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.11"
|
||||
"version": "3.11.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
@@ -38,8 +38,6 @@
|
||||
"from dotenv import load_dotenv\n",
|
||||
"from huggingface_hub import login\n",
|
||||
"from datasets import load_dataset, Dataset, DatasetDict\n",
|
||||
"from items import Item\n",
|
||||
"from loaders import ItemLoader\n",
|
||||
"import matplotlib.pyplot as plt\n",
|
||||
"from collections import Counter, defaultdict\n",
|
||||
"import numpy as np\n",
|
||||
@@ -74,6 +72,19 @@
|
||||
"login(hf_token, add_to_git_credential=True)"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
"id": "767081df-ee34-4309-ab4c-46d62b4ae367",
|
||||
"metadata": {},
|
||||
"outputs": [],
|
||||
"source": [
|
||||
"# And some more imports - with thanks to Alex C for pointing out that I need to do these after the HF login..\n",
|
||||
"\n",
|
||||
"from items import Item\n",
|
||||
"from loaders import ItemLoader"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": null,
|
||||
@@ -416,7 +427,7 @@
|
||||
"name": "python",
|
||||
"nbconvert_exporter": "python",
|
||||
"pygments_lexer": "ipython3",
|
||||
"version": "3.11.10"
|
||||
"version": "3.11.12"
|
||||
}
|
||||
},
|
||||
"nbformat": 4,
|
||||
|
||||
Reference in New Issue
Block a user