Upload agents/text_agent.py with huggingface_hub
Browse files- agents/text_agent.py +1 -1
agents/text_agent.py
CHANGED
|
@@ -122,7 +122,7 @@ def run_text_agent(img):
|
|
| 122 |
conf = min(1.0, 0.4 + 0.5 * abs(avg))
|
| 123 |
if not vlm_ok: conf *= 0.3
|
| 124 |
|
| 125 |
-
text_found = any(f.get("text_found",
|
| 126 |
if not text_found and vlm_ok:
|
| 127 |
rat = "No text visible in image. Text agent not applicable."
|
| 128 |
conf = 0.1
|
|
|
|
| 122 |
conf = min(1.0, 0.4 + 0.5 * abs(avg))
|
| 123 |
if not vlm_ok: conf *= 0.3
|
| 124 |
|
| 125 |
+
text_found = any(f.get("text_found", False) for f in findings if "vlm_analysis" in f)
|
| 126 |
if not text_found and vlm_ok:
|
| 127 |
rat = "No text visible in image. Text agent not applicable."
|
| 128 |
conf = 0.1
|