Spaces:
Sleeping
Sleeping
metadata
title: TutorialMaker
emoji: π»
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 6.19.0
python_version: '3.13'
app_file: app.py
pinned: false
license: mit
short_description: Make Tutorials from YouTube Videos
YouTube β Tutorial Post Generator
Give a topic and your Hugging Face token, and this Space builds a downloadable
.docx tutorial (text + AI-captioned screenshots) from the single best YouTube video
on that topic.
Pipeline
- Search β top 5 videos via the
adarshajay/youtube-searchSpace. - Sentiment rank β fetch top comments per video with
yt-dlpand score them with the BERT classifierOmarMedhat7/youtube-sentiment-analysis-model; the video with the highest positive share wins. - Download the winner with
yt-dlpand extract audio withffmpeg. - Transcribe locally with
faster-whisper(segment timestamps). - Candidate frames are extracted densely from the video, then the video is auto-deleted β only small JPEGs and the transcript remain.
- Tutorial text β
deepseek-ai/DeepSeek-V3(HF Inference Providers, billed to your token) turns the transcript into structured steps. - Screenshot selection β a weighted indicator blends each step's LLM-suggested timestamp with Whisper's actual speech timing.
- Captions β a vision model (default
Qwen/Qwen2.5-VL-72B-Instruct, billed to your token) captions each screenshot. - Assemble the
.docxfor download.
Notes
- Your HF token is used only for the LLM and vision-model calls and is billed to your account. Create a fine-grained token with "Make calls to Inference Providers" at https://huggingface.co/settings/tokens.
- Free CPU tier: Whisper runs on CPU, so transcription is slow β keep videos short (default cap ~20 min).
- YouTube may block the Space's IP. If downloads/comments fail, add a Netscape-format
cookie file as a Space secret named
YT_COOKIES(the file's contents).
Local run
pip install -r requirements.txt # needs ffmpeg on PATH
python app.py