Advertisement
Guest User

llm-youtube-review.bash

a guest
Sep 18th, 2024
20
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 1.05 KB | None | 0 0
  1. #!/bin/bash
  2. url=$1
  3. cd ~/yt-dlp/ || exit 1
  4.  
  5. temp="0.7"
  6.  
  7. yt-dlp --no-warnings -q --skip-download --sub-format srv3 --write-auto-subs "${url}" -o video || exit 1
  8. title=$(yt-dlp --no-warnings -q --skip-download --get-title "${url}")
  9.  
  10. cat video.en.srv3 | html2text > video.txt
  11.  
  12. llm-python-file.py video.txt "You are a helpful assistant."  "The following is a youtube video transcription for a video named \`${title}\`."  "Write a synopsis of the video." "${temp}" | sed -e 's/\\n/\n/g' -e "s/\\'/'/g" -e "s/^'$//g" -e 's/\\//g'
  13.  
  14. llm-python-file.py video.txt "You are a helpful assistant."  "The following is a youtube video transcription for a video named \`${title}\`."  "Decide if the video title was clickbait." "${temp}" | sed -e 's/\\n/\n/g' -e "s/\\'/'/g" -e "s/^'$//g" -e 's/\\//g'
  15.  
  16. llm-python-file.py video.txt "You are a helpful assistant."  "The following is a youtube video transcription for a video named \`${title}\`."  "Write a short comment you would post about the video." "${temp}" | sed -e 's/\\n/\n/g' -e "s/\\'/'/g" -e "s/^'$//g" -e 's/\\//g'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement