From: Neil Smith Date: Thu, 24 Oct 2024 10:27:20 +0000 (+0100) Subject: Updated paths X-Git-Url: https://git.njae.me.uk/?a=commitdiff_plain;ds=sidebyside;p=ou-click-start-ai.git Updated paths --- diff --git a/1.titanic-survivors/1.titanic.ipynb b/1.titanic-survivors/1.titanic.ipynb index 2c5295c..97ddffb 100644 --- a/1.titanic-survivors/1.titanic.ipynb +++ b/1.titanic-survivors/1.titanic.ipynb @@ -51,7 +51,7 @@ "metadata": {}, "outputs": [], "source": [ - "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/1.titanic-survivors/titanic.csv" + "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/1.titanic-survivors/titanic.csv" ] }, { diff --git a/1.titanic-survivors/1.titanic.md b/1.titanic-survivors/1.titanic.md index 76d258d..04acf3a 100644 --- a/1.titanic-survivors/1.titanic.md +++ b/1.titanic-survivors/1.titanic.md @@ -36,7 +36,7 @@ from sklearn.model_selection import train_test_split, cross_val_score ``` ```python -!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/1.titanic-survivors/titanic.csv +!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/1.titanic-survivors/titanic.csv ``` ```python diff --git a/2.markov-chains/2.markov.ipynb b/2.markov-chains/2.markov.ipynb index 657671d..04f044a 100644 --- a/2.markov-chains/2.markov.ipynb +++ b/2.markov-chains/2.markov.ipynb @@ -164,10 +164,10 @@ "metadata": {}, "outputs": [], "source": [ - "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/2.markov-chains/le-mort-d-arthur.txt\n", - "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/2.markov-chains/odyssey.txt\n", - "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/2.markov-chains/pride-and-prejudice.txt\n", - "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/2.markov-chains/tale-of-two-cities.txt" + "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/2.markov-chains/le-mort-d-arthur.txt\n", + "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/2.markov-chains/odyssey.txt\n", + "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/2.markov-chains/pride-and-prejudice.txt\n", + "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/2.markov-chains/tale-of-two-cities.txt" ] }, { @@ -845,6 +845,22 @@ "pprint(generate_text(two_cities_model, max_length=100))" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "## Generating random text" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "We've got all the parts. Let's generate some large pieces of text. Do these have the same style as the originals? Are those styles distinctive enough to tell which model generated which text?\n", + "\n", + "First we'll load some other books..." + ] + }, { "cell_type": "code", "execution_count": null, @@ -897,14 +913,7 @@ "cell_type": "markdown", "metadata": {}, "source": [ - "## Generating random text" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "We've got all the parts. Let's generate some large pieces of text. Do these have the same style as the originals? Are those styles distinctive enough to tell which model generated which text?" + ",,, then generate some text." ] }, { @@ -943,13 +952,6 @@ "pprint(generate_text(arthur_model))" ] }, - { - "cell_type": "code", - "execution_count": null, - "metadata": {}, - "outputs": [], - "source": [] - }, { "cell_type": "markdown", "metadata": {}, diff --git a/2.markov-chains/2.markov.md b/2.markov-chains/2.markov.md index f1c7d49..b62baa5 100644 --- a/2.markov-chains/2.markov.md +++ b/2.markov-chains/2.markov.md @@ -142,10 +142,10 @@ from IPython.display import display, HTML ``` ```python -!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/2.markov-chains/le-mort-d-arthur.txt -!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/2.markov-chains/odyssey.txt -!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/2.markov-chains/pride-and-prejudice.txt -!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/2.markov-chains/tale-of-two-cities.txt +!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/2.markov-chains/le-mort-d-arthur.txt +!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/2.markov-chains/odyssey.txt +!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/2.markov-chains/pride-and-prejudice.txt +!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/2.markov-chains/tale-of-two-cities.txt ``` ```python jupyter={"outputs_hidden": false} @@ -488,6 +488,13 @@ def pprint(tokens): pprint(generate_text(two_cities_model, max_length=100)) ``` +## Generating random text + + +We've got all the parts. Let's generate some large pieces of text. Do these have the same style as the originals? Are those styles distinctive enough to tell which model generated which text? + +First we'll load some other books... + ```python jupyter={"outputs_hidden": false} odyssey = open('odyssey.txt').read() odyssey_model = build_model(tokenise(odyssey), tuple_size=3) @@ -506,10 +513,7 @@ arthur_model = build_model(tokenise(arthur), tuple_size=3) len(arthur_model) ``` -## Generating random text - - -We've got all the parts. Let's generate some large pieces of text. Do these have the same style as the originals? Are those styles distinctive enough to tell which model generated which text? +,,, then generate some text. ```python pprint(generate_text(odyssey_model)) @@ -527,10 +531,6 @@ pprint(generate_text(pride_model)) pprint(generate_text(arthur_model)) ``` -```python - -``` - # Merging models diff --git a/3.eliza/3.eliza.ipynb b/3.eliza/3.eliza.ipynb index 4ebb873..af38c80 100644 --- a/3.eliza/3.eliza.ipynb +++ b/3.eliza/3.eliza.ipynb @@ -109,7 +109,7 @@ "metadata": {}, "outputs": [], "source": [ - "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/3.eliza/rules.yaml" + "!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/3.eliza/rules.yaml" ] }, { diff --git a/3.eliza/3.eliza.md b/3.eliza/3.eliza.md index 238dc02..90b8bad 100644 --- a/3.eliza/3.eliza.md +++ b/3.eliza/3.eliza.md @@ -63,7 +63,7 @@ We'll take each of these steps in turn. We can download some rules to work with. Execute this cell. ```python -!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-quick-start-ai/main/3.eliza/rules.yaml +!wget --no-check-certificate https://raw.githubusercontent.com/NeilNjae/ou-click-start-ai/main/3.eliza/rules.yaml ``` You can look at the raw rules file by clicking on the "Files" icon in the left sidebar and choosing the `rules.yaml` entry. You should be alboe to see that the rules follow the structure of a pattern and a set of possible responses.