Fix worker returning tuples instead of strings for analysis results

parent baa55f06
......@@ -152,7 +152,8 @@ def analyze_single_image(image_path, prompt, model):
}
]
result = model.generate({"messages": messages}, max_new_tokens=128)
result, tokens_used = model.generate({"messages": messages}, max_new_tokens=128)
return result
# For now, estimate tokens (could be improved with actual token counting)
estimated_tokens = len(result.split()) + len(prompt.split())
return result, estimated_tokens
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment