from pr.vision import post_image as vision_post_image
|
|
import functools
|
|
|
|
|
|
@functools.lru_cache()
|
|
def post_image(path: str, prompt: str = None):
|
|
"""Post an image for analysis.
|
|
|
|
Args:
|
|
path: Path to the image file.
|
|
prompt: Optional prompt for analysis.
|
|
|
|
Returns:
|
|
Analysis result.
|
|
"""
|
|
try:
|
|
return vision_post_image(path=path, prompt=prompt)
|
|
except Exception:
|
|
raise
|