chart-analyzer / vision_model.py
tmmdev's picture
Upload 13 files
e42e5e9 verified
raw
history blame
442 Bytes
import ollama
from PIL import Image
class ChartVisionModel:
def __init__(self):
self.client = ollama.Client()
self.model = "llava:34b" # Using LLaVA for vision analysis
def analyze_chart(self, image):
response = self.client.generate(
model=self.model,
prompt="Analyze this technical chart in detail",
images=[image]
)
return response