Standard escape codes are prefixed with Escape
:
- Ctrl-Key:
^[
- Octal:
\033
- Unicode:
\u001b
- Hexadecimal:
\x1B
- Decimal:
27
#!/bin/zsh | |
set -o errexit | |
cd /media/storage_1/photos_and_vids | |
for f in $(find . -type f | grep -Ei '(.jpg$|.jpeg$|.gif$|.png$|.bmp$)') | |
do | |
new_name="$(llava-v1.5-7b-q4.llamafile --cli --image $f --temp 0 --grammar 'root ::= [a-z]+ (" " [a-z]+)+' -n 30 -e -p '### User: The image looks like it has within it (described very concisely)...\n### Assistant:' --silent-prompt 2>/dev/null | sed -e's/ /_/g')" | |
suffix="${f##*.}" | |
filename="$(basename $f)" | |
dirname="$(dirname $f)" | |
old_filename="${filename%.*}" |