Skip to content

Commit 62518f1

Browse files
authored
Merge pull request #16 from generative-computing/notebooks
Wrap cell output
2 parents 4e20a92 + d984599 commit 62518f1

11 files changed

+78
-34
lines changed

docs/examples/notebooks/compositionality_with_generative_slots.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"source": [
1919
"## Install Ollama\n",
2020
"\n",
21-
"Before we get started with Mellea, we download and install ollama."
21+
"Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output."
2222
]
2323
},
2424
{
@@ -29,8 +29,12 @@
2929
},
3030
"outputs": [],
3131
"source": [
32-
"!curl -fsSL https://ollama.com/install.sh | sh\n",
33-
"!nohup ollama serve &"
32+
"!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n",
33+
"!nohup ollama serve >/dev/null 2>&1 &\n",
34+
"\n",
35+
"from IPython.display import HTML, display\n",
36+
"def set_css(): display(HTML('\\n<style>\\n pre{\\n white-space: pre-wrap;\\n}\\n</style>\\n'))\n",
37+
"get_ipython().events.register('pre_run_cell',set_css)"
3438
]
3539
},
3640
{

docs/examples/notebooks/context_example.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"source": [
1919
"## Install Ollama\n",
2020
"\n",
21-
"Before we get started with Mellea, we download and install ollama."
21+
"Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output."
2222
]
2323
},
2424
{
@@ -29,8 +29,12 @@
2929
},
3030
"outputs": [],
3131
"source": [
32-
"!curl -fsSL https://ollama.com/install.sh | sh\n",
33-
"!nohup ollama serve &"
32+
"!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n",
33+
"!nohup ollama serve >/dev/null 2>&1 &\n",
34+
"\n",
35+
"from IPython.display import HTML, display\n",
36+
"def set_css(): display(HTML('\\n<style>\\n pre{\\n white-space: pre-wrap;\\n}\\n</style>\\n'))\n",
37+
"get_ipython().events.register('pre_run_cell',set_css)"
3438
]
3539
},
3640
{

docs/examples/notebooks/document_mobject.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"source": [
1919
"## Install Ollama\n",
2020
"\n",
21-
"Before we get started with Mellea, we download and install ollama."
21+
"Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output."
2222
]
2323
},
2424
{
@@ -29,8 +29,12 @@
2929
},
3030
"outputs": [],
3131
"source": [
32-
"!curl -fsSL https://ollama.com/install.sh | sh\n",
33-
"!nohup ollama serve &"
32+
"!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n",
33+
"!nohup ollama serve >/dev/null 2>&1 &\n",
34+
"\n",
35+
"from IPython.display import HTML, display\n",
36+
"def set_css(): display(HTML('\\n<style>\\n pre{\\n white-space: pre-wrap;\\n}\\n</style>\\n'))\n",
37+
"get_ipython().events.register('pre_run_cell',set_css)"
3438
]
3539
},
3640
{

docs/examples/notebooks/example.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"source": [
1919
"## Install Ollama\n",
2020
"\n",
21-
"Before we get started with Mellea, we download and install ollama."
21+
"Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output."
2222
]
2323
},
2424
{
@@ -29,8 +29,12 @@
2929
},
3030
"outputs": [],
3131
"source": [
32-
"!curl -fsSL https://ollama.com/install.sh | sh\n",
33-
"!nohup ollama serve &"
32+
"!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n",
33+
"!nohup ollama serve >/dev/null 2>&1 &\n",
34+
"\n",
35+
"from IPython.display import HTML, display\n",
36+
"def set_css(): display(HTML('\\n<style>\\n pre{\\n white-space: pre-wrap;\\n}\\n</style>\\n'))\n",
37+
"get_ipython().events.register('pre_run_cell',set_css)"
3438
]
3539
},
3640
{

docs/examples/notebooks/instruct_validate_repair.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"source": [
1919
"## Install Ollama\n",
2020
"\n",
21-
"Before we get started with Mellea, we download and install ollama."
21+
"Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output."
2222
]
2323
},
2424
{
@@ -29,8 +29,12 @@
2929
},
3030
"outputs": [],
3131
"source": [
32-
"!curl -fsSL https://ollama.com/install.sh | sh\n",
33-
"!nohup ollama serve &"
32+
"!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n",
33+
"!nohup ollama serve >/dev/null 2>&1 &\n",
34+
"\n",
35+
"from IPython.display import HTML, display\n",
36+
"def set_css(): display(HTML('\\n<style>\\n pre{\\n white-space: pre-wrap;\\n}\\n</style>\\n'))\n",
37+
"get_ipython().events.register('pre_run_cell',set_css)"
3438
]
3539
},
3640
{

docs/examples/notebooks/m_serve_example.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"source": [
1919
"## Install Ollama\n",
2020
"\n",
21-
"Before we get started with Mellea, we download and install ollama."
21+
"Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output."
2222
]
2323
},
2424
{
@@ -29,8 +29,12 @@
2929
},
3030
"outputs": [],
3131
"source": [
32-
"!curl -fsSL https://ollama.com/install.sh | sh\n",
33-
"!nohup ollama serve &"
32+
"!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n",
33+
"!nohup ollama serve >/dev/null 2>&1 &\n",
34+
"\n",
35+
"from IPython.display import HTML, display\n",
36+
"def set_css(): display(HTML('\\n<style>\\n pre{\\n white-space: pre-wrap;\\n}\\n</style>\\n'))\n",
37+
"get_ipython().events.register('pre_run_cell',set_css)"
3438
]
3539
},
3640
{

docs/examples/notebooks/mcp_example.ipynb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"source": [
2020
"## Install Ollama and MCP\n",
2121
"\n",
22-
"Before we get started with Mellea, we install ollama and mcp"
22+
"Before we get started with Mellea, we download, install and serve ollama, and install mcp. We define set_css to wrap Colab output."
2323
]
2424
},
2525
{
@@ -30,9 +30,13 @@
3030
},
3131
"outputs": [],
3232
"source": [
33-
"!curl -fsSL https://ollama.com/install.sh | sh\n",
34-
"!nohup ollama serve &\n",
35-
"!uv pip install mcp -q"
33+
"!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n",
34+
"!nohup ollama serve >/dev/null 2>&1 &\n",
35+
"!uv pip install mcp -q\n",
36+
"\n",
37+
"from IPython.display import HTML, display\n",
38+
"def set_css(): display(HTML('\\n<style>\\n pre{\\n white-space: pre-wrap;\\n}\\n</style>\\n'))\n",
39+
"get_ipython().events.register('pre_run_cell',set_css)"
3640
]
3741
},
3842
{

docs/examples/notebooks/model_options_example.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"source": [
1919
"## Install Ollama\n",
2020
"\n",
21-
"Before we get started with Mellea, we download and install ollama."
21+
"Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output."
2222
]
2323
},
2424
{
@@ -29,8 +29,12 @@
2929
},
3030
"outputs": [],
3131
"source": [
32-
"!curl -fsSL https://ollama.com/install.sh | sh\n",
33-
"!nohup ollama serve &"
32+
"!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n",
33+
"!nohup ollama serve >/dev/null 2>&1 &\n",
34+
"\n",
35+
"from IPython.display import HTML, display\n",
36+
"def set_css(): display(HTML('\\n<style>\\n pre{\\n white-space: pre-wrap;\\n}\\n</style>\\n'))\n",
37+
"get_ipython().events.register('pre_run_cell',set_css)"
3438
]
3539
},
3640
{

docs/examples/notebooks/sentiment_classifier.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"source": [
1919
"## Install Ollama\n",
2020
"\n",
21-
"Before we get started with Mellea, we download and install ollama."
21+
"Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output."
2222
]
2323
},
2424
{
@@ -29,8 +29,12 @@
2929
},
3030
"outputs": [],
3131
"source": [
32-
"!curl -fsSL https://ollama.com/install.sh | sh\n",
33-
"!nohup ollama serve &"
32+
"!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n",
33+
"!nohup ollama serve >/dev/null 2>&1 &\n",
34+
"\n",
35+
"from IPython.display import HTML, display\n",
36+
"def set_css(): display(HTML('\\n<style>\\n pre{\\n white-space: pre-wrap;\\n}\\n</style>\\n'))\n",
37+
"get_ipython().events.register('pre_run_cell',set_css)"
3438
]
3539
},
3640
{

docs/examples/notebooks/simple_email.ipynb

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"source": [
1919
"## Install Ollama\n",
2020
"\n",
21-
"Before we get started with Mellea, we download and install ollama."
21+
"Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output."
2222
]
2323
},
2424
{
@@ -29,8 +29,12 @@
2929
},
3030
"outputs": [],
3131
"source": [
32-
"!curl -fsSL https://ollama.com/install.sh | sh\n",
33-
"!nohup ollama serve &"
32+
"!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n",
33+
"!nohup ollama serve >/dev/null 2>&1 &\n",
34+
"\n",
35+
"from IPython.display import HTML, display\n",
36+
"def set_css(): display(HTML('\\n<style>\\n pre{\\n white-space: pre-wrap;\\n}\\n</style>\\n'))\n",
37+
"get_ipython().events.register('pre_run_cell',set_css)"
3438
]
3539
},
3640
{

0 commit comments

Comments
 (0)