examples: add basic python example

This commit is contained in:
Jeffrey Morgan
2023-07-08 17:40:05 -04:00
parent a8dc0c9b5f
commit 993cb9fad6
2 changed files with 47 additions and 0 deletions

15
examples/python/README.md Normal file
View File

@@ -0,0 +1,15 @@
# Python
This is a simple example of calling the Ollama api from a python app.
First, download a model:
```
curl -L https://huggingface.co/TheBloke/orca_mini_3B-GGML/resolve/main/orca-mini-3b.ggmlv3.q4_1.bin -o orca.bin
```
Then run it using the example script. You'll need to have Ollama running on your machine.
```
python3 main.py orca.bin
```