Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| habrok:examples:ollama [2025/09/04 10:59] – camarocico | habrok:examples:ollama [2025/10/15 11:42] (current) – pedro | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | ====== Ollama on Habrok | + | ====== Ollama on Hábrók |
| - | You can run an LLM on Habrok | + | You can run an LLM on Hábrók |
| ===== Setting up the virtual environment ===== | ===== Setting up the virtual environment ===== | ||
| - | To be able to use the app, you first need to set up a Python virtual environment. The version of Ollama installed on Habrok | + | To be able to use the app, you first need to set up a Python virtual environment. The version of Ollama installed on Hábrók |
| <code shell> | <code shell> | ||
| Line 30: | Line 30: | ||
| ===== Simple usage example ===== | ===== Simple usage example ===== | ||
| - | To use Ollama in the Jupyter app, here& | + | To use Ollama in the Jupyter app, you need first to open a new notebook in the Jupyter app, and choose the **Ollama** Jupyter kernel built when setting up the virtual environment. Here is a small example which first imports the necessary packages: |
| <code python> | <code python> | ||
| import os | import os | ||
| Line 76: | Line 76: | ||
| ollama.delete(" | ollama.delete(" | ||
| </ | </ | ||
| + | |||
| + | You can find more info on how to use the Ollama Python library on their [[https:// | ||
| + | |||