File tree Expand file tree Collapse file tree 4 files changed +7
-9
lines changed
Expand file tree Collapse file tree 4 files changed +7
-9
lines changed Original file line number Diff line number Diff line change 1+ export COCOINDEX_DATABASE_URL = " postgres://cocoindex:cocoindex@localhost/cocoindex"
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 44from typing import Any
55
66import cocoindex
7- import numpy as np
87from dotenv import load_dotenv
9- from fastapi import FastAPI , Query , HTTPException
8+ from fastapi import FastAPI , Query
109from fastapi .middleware .cors import CORSMiddleware
1110from fastapi .staticfiles import StaticFiles
12- from PIL import Image
1311from qdrant_client import QdrantClient
1412
1513
Original file line number Diff line number Diff line change @@ -4,15 +4,13 @@ version = "0.1.0"
44description = " Image search examples for cocoindex: CLIP and ColPali-based embedding."
55requires-python = " >=3.11"
66dependencies = [
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 ]
You can’t perform that action at this time.
0 commit comments