Spaces:
No application file
No application file
| 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 | |