From d984599ce124abe826c91a60ac209cbccaed36bf Mon Sep 17 00:00:00 2001 From: Kenneth Ocheltree Date: Thu, 7 Aug 2025 17:50:36 -0400 Subject: [PATCH] Wrap cell output --- .../compositionality_with_generative_slots.ipynb | 10 +++++++--- docs/examples/notebooks/context_example.ipynb | 10 +++++++--- docs/examples/notebooks/document_mobject.ipynb | 10 +++++++--- docs/examples/notebooks/example.ipynb | 10 +++++++--- .../notebooks/instruct_validate_repair.ipynb | 10 +++++++--- docs/examples/notebooks/m_serve_example.ipynb | 10 +++++++--- docs/examples/notebooks/mcp_example.ipynb | 12 ++++++++---- docs/examples/notebooks/model_options_example.ipynb | 10 +++++++--- docs/examples/notebooks/sentiment_classifier.ipynb | 10 +++++++--- docs/examples/notebooks/simple_email.ipynb | 10 +++++++--- docs/examples/notebooks/table_mobject.ipynb | 10 +++++++--- 11 files changed, 78 insertions(+), 34 deletions(-) diff --git a/docs/examples/notebooks/compositionality_with_generative_slots.ipynb b/docs/examples/notebooks/compositionality_with_generative_slots.ipynb index ed73be81..08a06e65 100644 --- a/docs/examples/notebooks/compositionality_with_generative_slots.ipynb +++ b/docs/examples/notebooks/compositionality_with_generative_slots.ipynb @@ -18,7 +18,7 @@ "source": [ "## Install Ollama\n", "\n", - "Before we get started with Mellea, we download and install ollama." + "Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output." ] }, { @@ -29,8 +29,12 @@ }, "outputs": [], "source": [ - "!curl -fsSL https://ollama.com/install.sh | sh\n", - "!nohup ollama serve &" + "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", + "!nohup ollama serve >/dev/null 2>&1 &\n", + "\n", + "from IPython.display import HTML, display\n", + "def set_css(): display(HTML('\\n\\n'))\n", + "get_ipython().events.register('pre_run_cell',set_css)" ] }, { diff --git a/docs/examples/notebooks/context_example.ipynb b/docs/examples/notebooks/context_example.ipynb index e182d2f5..20c62882 100644 --- a/docs/examples/notebooks/context_example.ipynb +++ b/docs/examples/notebooks/context_example.ipynb @@ -18,7 +18,7 @@ "source": [ "## Install Ollama\n", "\n", - "Before we get started with Mellea, we download and install ollama." + "Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output." ] }, { @@ -29,8 +29,12 @@ }, "outputs": [], "source": [ - "!curl -fsSL https://ollama.com/install.sh | sh\n", - "!nohup ollama serve &" + "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", + "!nohup ollama serve >/dev/null 2>&1 &\n", + "\n", + "from IPython.display import HTML, display\n", + "def set_css(): display(HTML('\\n\\n'))\n", + "get_ipython().events.register('pre_run_cell',set_css)" ] }, { diff --git a/docs/examples/notebooks/document_mobject.ipynb b/docs/examples/notebooks/document_mobject.ipynb index b13b2c90..460f0171 100644 --- a/docs/examples/notebooks/document_mobject.ipynb +++ b/docs/examples/notebooks/document_mobject.ipynb @@ -18,7 +18,7 @@ "source": [ "## Install Ollama\n", "\n", - "Before we get started with Mellea, we download and install ollama." + "Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output." ] }, { @@ -29,8 +29,12 @@ }, "outputs": [], "source": [ - "!curl -fsSL https://ollama.com/install.sh | sh\n", - "!nohup ollama serve &" + "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", + "!nohup ollama serve >/dev/null 2>&1 &\n", + "\n", + "from IPython.display import HTML, display\n", + "def set_css(): display(HTML('\\n\\n'))\n", + "get_ipython().events.register('pre_run_cell',set_css)" ] }, { diff --git a/docs/examples/notebooks/example.ipynb b/docs/examples/notebooks/example.ipynb index e8714b3f..99ff57f4 100644 --- a/docs/examples/notebooks/example.ipynb +++ b/docs/examples/notebooks/example.ipynb @@ -18,7 +18,7 @@ "source": [ "## Install Ollama\n", "\n", - "Before we get started with Mellea, we download and install ollama." + "Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output." ] }, { @@ -29,8 +29,12 @@ }, "outputs": [], "source": [ - "!curl -fsSL https://ollama.com/install.sh | sh\n", - "!nohup ollama serve &" + "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", + "!nohup ollama serve >/dev/null 2>&1 &\n", + "\n", + "from IPython.display import HTML, display\n", + "def set_css(): display(HTML('\\n\\n'))\n", + "get_ipython().events.register('pre_run_cell',set_css)" ] }, { diff --git a/docs/examples/notebooks/instruct_validate_repair.ipynb b/docs/examples/notebooks/instruct_validate_repair.ipynb index 590a69d2..5fa75a02 100644 --- a/docs/examples/notebooks/instruct_validate_repair.ipynb +++ b/docs/examples/notebooks/instruct_validate_repair.ipynb @@ -18,7 +18,7 @@ "source": [ "## Install Ollama\n", "\n", - "Before we get started with Mellea, we download and install ollama." + "Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output." ] }, { @@ -29,8 +29,12 @@ }, "outputs": [], "source": [ - "!curl -fsSL https://ollama.com/install.sh | sh\n", - "!nohup ollama serve &" + "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", + "!nohup ollama serve >/dev/null 2>&1 &\n", + "\n", + "from IPython.display import HTML, display\n", + "def set_css(): display(HTML('\\n\\n'))\n", + "get_ipython().events.register('pre_run_cell',set_css)" ] }, { diff --git a/docs/examples/notebooks/m_serve_example.ipynb b/docs/examples/notebooks/m_serve_example.ipynb index 7b3ea7d5..d2b6684c 100644 --- a/docs/examples/notebooks/m_serve_example.ipynb +++ b/docs/examples/notebooks/m_serve_example.ipynb @@ -18,7 +18,7 @@ "source": [ "## Install Ollama\n", "\n", - "Before we get started with Mellea, we download and install ollama." + "Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output." ] }, { @@ -29,8 +29,12 @@ }, "outputs": [], "source": [ - "!curl -fsSL https://ollama.com/install.sh | sh\n", - "!nohup ollama serve &" + "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", + "!nohup ollama serve >/dev/null 2>&1 &\n", + "\n", + "from IPython.display import HTML, display\n", + "def set_css(): display(HTML('\\n\\n'))\n", + "get_ipython().events.register('pre_run_cell',set_css)" ] }, { diff --git a/docs/examples/notebooks/mcp_example.ipynb b/docs/examples/notebooks/mcp_example.ipynb index dee307e1..1a599685 100644 --- a/docs/examples/notebooks/mcp_example.ipynb +++ b/docs/examples/notebooks/mcp_example.ipynb @@ -19,7 +19,7 @@ "source": [ "## Install Ollama and MCP\n", "\n", - "Before we get started with Mellea, we install ollama and mcp" + "Before we get started with Mellea, we download, install and serve ollama, and install mcp. We define set_css to wrap Colab output." ] }, { @@ -30,9 +30,13 @@ }, "outputs": [], "source": [ - "!curl -fsSL https://ollama.com/install.sh | sh\n", - "!nohup ollama serve &\n", - "!uv pip install mcp -q" + "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", + "!nohup ollama serve >/dev/null 2>&1 &\n", + "!uv pip install mcp -q\n", + "\n", + "from IPython.display import HTML, display\n", + "def set_css(): display(HTML('\\n\\n'))\n", + "get_ipython().events.register('pre_run_cell',set_css)" ] }, { diff --git a/docs/examples/notebooks/model_options_example.ipynb b/docs/examples/notebooks/model_options_example.ipynb index 51de395c..0b7433bc 100644 --- a/docs/examples/notebooks/model_options_example.ipynb +++ b/docs/examples/notebooks/model_options_example.ipynb @@ -18,7 +18,7 @@ "source": [ "## Install Ollama\n", "\n", - "Before we get started with Mellea, we download and install ollama." + "Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output." ] }, { @@ -29,8 +29,12 @@ }, "outputs": [], "source": [ - "!curl -fsSL https://ollama.com/install.sh | sh\n", - "!nohup ollama serve &" + "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", + "!nohup ollama serve >/dev/null 2>&1 &\n", + "\n", + "from IPython.display import HTML, display\n", + "def set_css(): display(HTML('\\n\\n'))\n", + "get_ipython().events.register('pre_run_cell',set_css)" ] }, { diff --git a/docs/examples/notebooks/sentiment_classifier.ipynb b/docs/examples/notebooks/sentiment_classifier.ipynb index 372af834..abd0f32c 100644 --- a/docs/examples/notebooks/sentiment_classifier.ipynb +++ b/docs/examples/notebooks/sentiment_classifier.ipynb @@ -18,7 +18,7 @@ "source": [ "## Install Ollama\n", "\n", - "Before we get started with Mellea, we download and install ollama." + "Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output." ] }, { @@ -29,8 +29,12 @@ }, "outputs": [], "source": [ - "!curl -fsSL https://ollama.com/install.sh | sh\n", - "!nohup ollama serve &" + "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", + "!nohup ollama serve >/dev/null 2>&1 &\n", + "\n", + "from IPython.display import HTML, display\n", + "def set_css(): display(HTML('\\n\\n'))\n", + "get_ipython().events.register('pre_run_cell',set_css)" ] }, { diff --git a/docs/examples/notebooks/simple_email.ipynb b/docs/examples/notebooks/simple_email.ipynb index e1369f19..43e96409 100644 --- a/docs/examples/notebooks/simple_email.ipynb +++ b/docs/examples/notebooks/simple_email.ipynb @@ -18,7 +18,7 @@ "source": [ "## Install Ollama\n", "\n", - "Before we get started with Mellea, we download and install ollama." + "Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output." ] }, { @@ -29,8 +29,12 @@ }, "outputs": [], "source": [ - "!curl -fsSL https://ollama.com/install.sh | sh\n", - "!nohup ollama serve &" + "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", + "!nohup ollama serve >/dev/null 2>&1 &\n", + "\n", + "from IPython.display import HTML, display\n", + "def set_css(): display(HTML('\\n\\n'))\n", + "get_ipython().events.register('pre_run_cell',set_css)" ] }, { diff --git a/docs/examples/notebooks/table_mobject.ipynb b/docs/examples/notebooks/table_mobject.ipynb index 791709ea..708b1729 100644 --- a/docs/examples/notebooks/table_mobject.ipynb +++ b/docs/examples/notebooks/table_mobject.ipynb @@ -18,7 +18,7 @@ "source": [ "## Install Ollama\n", "\n", - "Before we get started with Mellea, we download and install ollama." + "Before we get started with Mellea, we download, install and serve ollama. We define set_css to wrap Colab output." ] }, { @@ -29,8 +29,12 @@ }, "outputs": [], "source": [ - "!curl -fsSL https://ollama.com/install.sh | sh\n", - "!nohup ollama serve &" + "!curl -fsSL https://ollama.com/install.sh | sh > /dev/null\n", + "!nohup ollama serve >/dev/null 2>&1 &\n", + "\n", + "from IPython.display import HTML, display\n", + "def set_css(): display(HTML('\\n\\n'))\n", + "get_ipython().events.register('pre_run_cell',set_css)" ] }, {