Last active
November 3, 2024 21:24
-
-
Save Talor-A/f1a8e487025187995049870b6d62db70 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on open dropped_items | |
repeat with imageFile in dropped_items | |
set imagePath to POSIX path of imageFile | |
try | |
set cmd to "PATH=$PATH:~/.local/bin && llm prompt \"You are a helpful image transcriber bot and it is your job to explain exactly what is in images so that blind people and other LLMs can understand the image. first state in plain terms what the pictured image looks like. then exactly transcribe word-for-word all text inside. it is important to transcribe all content so that no detail is omitted. do not include any other text in your reply besides these two things. EXAMPLE: 'a chat app with the message hello world as the first reply'. Now give your description of this image:\" -a " & quoted form of imagePath | |
set altText to do shell script cmd | |
display dialog altText buttons {"Copy", "OK"} default button "Copy" | |
if button returned of result is "Copy" then | |
set the clipboard to altText | |
end if | |
on error errMsg | |
display dialog "Error processing image: " & errMsg buttons {"OK"} default button "OK" with icon stop | |
end try | |
end repeat | |
end open |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment