CoolFace
Apppublic

LRU1/lec2note

sourceHugging Faceapache-2.0updated 1y agoView on Hugging Face
0likes
App README

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.