README.md

Transcinopsis

🇷🇺 Transcinopsis - это утилита, позволяющая получить краткий пересказ содержимого видео на Youtube, а также получать ответы на конкретные вопросы по содержанию, используя OpenAI API и языковую модель GPT-3.5.

Установка


Требования: Python >=3.10.10, curl >=8.0.1, recode >=3.7.14 1. Установите модули openai и tiktoken: pip install openai tiktoken

  1. Получите API-ключ на сайте OpenAI: https://platform.openai.com/account/api-keys

  2. Клонируйте этот репозиторий: git clone https://gitflic.ru/project/visilll/transcinopsis.git

  3. Вставьте свой API-ключ в файл secret.txt

Использование


python tr.py

В данный момент утилита поддерживает 4 режима: 1. Краткий пересказ содержимого видео 2. Краткий план видео по пунктам 3. Пересказ содержимого видео по заданному пользователем запросу 4. Продвинутый режим: заданные пользователем команды системы и команды пользователя.

Команды системы представляют собой краткое описание того, как должна вести себя языковая модель, например:

You are helpful assistant summarizing user’s text. You reply with brief, to-the-point digest of a text, detailing main points.

Команда пользователя - это непосредственный запрос к нейросети по обработке содержимого видео. Здесь стоит указывать, что именно вас интересует и в какой форме / каком стиле вы хотите получить ответ, например:

Tell me what this transcript is about in style of the pirate Blackbeard

Примеры


Пример использования продвинутого режима:

Input the video URL: https://www.youtube.com/watch?v=hXP5fUfBGQQ
Choose language of a video (en/ru): en
Options: 1 - a brief digest of a video
2 - a brief bullet point plan of a video
3 - details about user-defined theme mentioned in a video
4 - detailed retell of a video
a - Advanced: specify ‘system’ and ‘user’ roles

Choose usage variant (1-3, a): a
‘role’: ‘system’, ‘content’: You are an assistant explaining the transcript provided by a user.
‘role’: ‘user’, ‘content’: Tell me what this transcript is about in style of the pirate Blackbeard
Arrr! Ahoy there, me mateys! Listen up, as we chart a course towards becoming more productive with our time, the most valuable non-renewable resource we’ve got. In this here transcript, we’ve got a scallywag who’s obsessed with saving time, and he’s sharing with us seven habits that help him save three hours every single day! At number seven, we’ve got the “capture” habit, which be all about offloading tasks or ideas from your noggin’ to a centralized system, so your brain ain’t got to worry about it. Then, there be the “daily adventure” habit, where every mornin’, ye ask yerself what the day’s adventure will be. Aye, productivity be all ‘bout havin’ fun with what ye do! Next up, there’s the “Rainbow calendar” habit, where ye color-code yer schedule to avoid gaps that lead to time-wasting. And then there’s the “five-minute rule” habit, to help ye beat procrastination by just gettin’ started for five minutes, me hearties! Aye, and if ye struggle with phone distractions like most of us do, ye can try the “focus phone” habit where ye put yer phone on “focus” mode, face down, always. And if ye want to get more quality sleep, try the “physical alarm clock” habit instead of usin’ yer phone. Lastly, me mateys, there be the “no TV unless with friends” habit, which be controversial, but it works for our productivity pirate, so give it a try and see if it helps ye too! That be all, me hearties! May ye find these habits helpful on yer voyage to greater productivity! Arrr!

Описание

Основанная на OpenAI API и GPT-3.5 утилита, предоставляющая краткий текстовый пересказ видео с Youtube и не только.

Конвейеры
0 успешных
0 с ошибкой