https://github.com/superfly/llm-describer
A simple image describer service using Ollama and PocketBase
https://github.com/superfly/llm-describer
Last synced: about 2 months ago
JSON representation
A simple image describer service using Ollama and PocketBase
- Host: GitHub
- URL: https://github.com/superfly/llm-describer
- Owner: superfly
- Created: 2024-03-19T19:24:52.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-06T15:46:51.000Z (about 1 year ago)
- Last Synced: 2024-06-19T19:31:49.348Z (12 months ago)
- Language: Go
- Homepage:
- Size: 88.9 KB
- Stars: 2
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# LLM Describer
This describer connects with a remote [Ollama](https://ollama.com) server, sends
it images, and returns descriptions to users. A
[PocketBase](https://pocketbase.io) frontend provides authentication,
authorization, an admin interface, and other features you might expect when
building a SaaS frontend for AI models. Configurations for deploying to
[Fly.io](https://fly.io) are also included.## Running
First you'll need an Ollama instance. The [llm/](llm/) directory contains a
simple configuration for deploying to Fly.io, but any instance will do. The
describer will run without an instance but all responses will be stubbed.Next, set the `OLLAMA_API` environment variable to the URL of your instance.
With that done, run:```bash
go run .
```## Client usage
[__init__.py](__init__.py) is an example of how to use this describer from
Python. Any PocketBase client API should do, or you can use the built-in REST
APIs directly from any language.First, create a user from your [admin interface](http://localhost:8090/_/). Then
set the following environment variables:* `LLM_DESCRIBER_URL`
* `LLM_DESCRIBER_USER`
* `LLM_DESCRIBER_PASSWORD`Download an image and place it in a file called *image.jpg* in the current
directory. Run the client, wait for the description, then type either a followup
question or "quit" to exit.