lec2note / README.md
LRU1's picture
fix the language problem
34365ef
|
raw
history blame
2.36 kB
metadata
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

# 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

python -m lec2note.scripts.run_pipeline --video path/to/lecture.mp4 --output notes.md

3. 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 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.