LRU1/lec2note
0
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
Project Overview
Lec2Note is an automatic lecture-to-note generator. Upload a lecture video (MP4/MKV/AVI) and receive a well-formatted Markdown study note containing:
- ASR transcription powered by OpenAI Whisper.
- Video segmentation using semantic & visual cues.
- LLM summarisation (e.g. GPT-4) for each segment, extracting key points, formulas and insights.
- Image extraction of key frames to illustrate the note.
- Markdown assembly into a single readable document.
Installation
# Requires Python ≥ 3.10
git clone https://github.com/your-name/Lec2Note.git
cd Lec2Note
python -m venv .venv && source .venv/bin/activate
pip install -r requirements.txtGPU inference: ensure CUDA and the matching PyTorch build are installed.
Quick Start
1. Web UI
Navigate to https://huggingface.co/spaces/LRU1/lec2note .
2. CLI
python -m lec2note.scripts.run_pipeline --video path/to/lecture.mp4 --output notes.md3. Required Environment Variables
export OPENAI_API_KEY=your_openai_api_key
export REPLICATE_API_TOKEN=your_replicate_api_token
export LOG_LEVEL=DEBUG(optional)
export AUDIO2TEXT_LOCAL=true|false(optional)Directory Structure
Lec2Note/
├── app.py # Streamlit front-end
├── lec2note/
│ ├── ingestion/ # Audio/video preprocessing & ASR
│ ├── segmentation/ # Semantic + visual segmentation
│ ├── processing/ # LLM summarisation & note generation
│ ├── synthesis/ # Markdown assembly
│ └── scripts/ # CLI entry points
└── tests/ # Test suiteEnvironment Variables
Some modules require the following environment variables:
OPENAI_API_KEY: OpenAI access token.WHISPER_MODEL: Whisper model name, defaultbase.
Contributing
Pull requests and issues are welcome! See DEVELOPER_GUIDE.md for code conventions and workflow.
License
Released under the Apache-2.0 license.
