Skip to content

Commit a4122b9

Browse files
committed
clean up for examples
1 parent 19c64ea commit a4122b9

File tree

4 files changed

+7
-9
lines changed

4 files changed

+7
-9
lines changed

examples/image_search/.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
export COCOINDEX_DATABASE_URL="postgres://cocoindex:cocoindex@localhost/cocoindex"

examples/image_search/README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,11 @@ This example provides two different image search implementations:
3030
- Ollama (Optional) for generating image captions
3131

3232
## Setup
33-
- Make sure Postgres and Qdrant are running
33+
- [Install Postgres](https://cocoindex.io/docs/getting_started/installation#-install-postgres) if you don't have one.
34+
35+
- Make sure Qdrant is running
3436
```
3537
docker run -d -p 6334:6334 -p 6333:6333 qdrant/qdrant
36-
export COCOINDEX_DATABASE_URL="postgres://cocoindex:cocoindex@localhost/cocoindex"
3738
```
3839

3940
## (Optional) Run Ollama

examples/image_search/colpali_main.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,10 @@
44
from typing import Any
55

66
import cocoindex
7-
import numpy as np
87
from dotenv import load_dotenv
9-
from fastapi import FastAPI, Query, HTTPException
8+
from fastapi import FastAPI, Query
109
from fastapi.middleware.cors import CORSMiddleware
1110
from fastapi.staticfiles import StaticFiles
12-
from PIL import Image
1311
from qdrant_client import QdrantClient
1412

1513

examples/image_search/pyproject.toml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,13 @@ version = "0.1.0"
44
description = "Image search examples for cocoindex: CLIP and ColPali-based embedding."
55
requires-python = ">=3.11"
66
dependencies = [
7-
"cocoindex>=0.1.75",
7+
"cocoindex[colpali]>=0.1.75",
88
"python-dotenv>=1.0.1",
99
"fastapi>=0.100.0",
1010
"torch>=2.0.0",
11-
"transformers>=4.29.0", # For CLIP model in main.py
11+
"transformers>=4.29.0", # For CLIP model in main.py
1212
"qdrant-client>=1.14.2",
1313
"uvicorn>=0.34.3",
14-
"Pillow>=10.0.0", # For ColPali image processing
15-
"numpy>=1.24.0", # For ColPali embeddings
1614
]
1715

1816
[tool.setuptools]

0 commit comments

Comments
 (0)