mirror of
https://github.com/Ladebeze66/llm_ticket3.git
synced 2025-12-16 00:06:53 +01:00
20 lines
588 B
Python
20 lines
588 B
Python
from agents.llama_vision.agent_vision_ocr import AgentVisionOCR
|
|
from llm_classes.llama_vision import LlamaVision
|
|
import json
|
|
|
|
# Instanciation du modèle
|
|
model = LlamaVision()
|
|
agent = AgentVisionOCR(model)
|
|
|
|
# Affichage des paramètres actifs
|
|
print("🔵 Paramètres actifs LLM:")
|
|
print(json.dumps(agent.llm.params, indent=2))
|
|
|
|
# Image à tester
|
|
image_path = "output/ticket_T11143/T11143_20250422_084617/attachments/image_145435.png"
|
|
|
|
# Test de l'OCR
|
|
res = agent.executer(image_path)
|
|
print(f"\n🔵 Résultat pour l'image {image_path}:")
|
|
print(f"Texte extrait:\n{res['extracted_text']}\n")
|