File size: 2,360 Bytes
3b7841b 2a6a638 3b7841b 34365ef |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 |
---
title: Lec2note
emoji: π’
colorFrom: red
colorTo: yellow
sdk: streamlit
app_file: app.py
pinned: false
license: apache-2.0
short_description: Using for automatically generating notes from video lectures
---
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
```bash
# 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.txt
```
GPU 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
```bash
python -m lec2note.scripts.run_pipeline --video path/to/lecture.mp4 --output notes.md
```
#### 3. Required Environment Variables
```bash
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
```text
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 suite
```
### Environment Variables
Some modules require the following environment variables:
- `OPENAI_API_KEY`: OpenAI access token.
- `WHISPER_MODEL`: Whisper model name, default `base`.
### Contributing
Pull requests and issues are welcome! See `DEVELOPER_GUIDE.md` for code conventions and workflow.
### License
Released under the Apache-2.0 license.
|