Spaces:
No application file
No application file
File size: 2,872 Bytes
639fb99 d342e49 e9663ac d342e49 e9663ac d342e49 e9663ac d342e49 e9663ac d342e49 e9663ac d342e49 e9663ac d342e49 e9663ac d342e49 e9663ac d342e49 e9663ac d342e49 | 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 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | ---
license: mit
title: Audio Lecture to Notes Generator
sdk: gradio
emoji: π
colorFrom: yellow
colorTo: yellow
short_description: An agent that converts lecture audio into clean Notes
---
# π AI Lecture Notes Generator
Transform lecture audio into structured, comprehensive notes using AI.
## Features
- ποΈ Transcribes lecture audio using OpenAI's Whisper Large V3 model
- π Generates well-structured markdown notes using Meta-Llama-3.1-8B
- π§ Identifies key concepts, points, and takeaways automatically
- π Simple web interface built with Gradio
- β‘ Optimized with 4-bit quantization for efficient inference
## Demo
<video controls autoplay src="https://cdn-uploads.huggingface.co/production/uploads/64ed91f11d42449431ee2253/0J7jWig2JLimC8n2NF0KO.mp4"></video>
## How It Works
1. **Audio Transcription**: Converts lecture audio to text using Whisper Large V3
2. **Note Generation**: Processes transcription through Llama 3.1 to create structured notes
3. **Format Cleaning**: Ensures consistent markdown formatting with proper headers
## Installation
```bash
# Clone the repository
git clone https://github.com/Abdulllah-Rizwan/AI_Lecture-s-Note-Generator.git
cd AI-Lecture-Notes-Generator
# Install dependencies
pip install requests torch bitsandbytes transformers sentencepiece accelerate gradio httpx==0.27.2
```
## Usage
### Option 1: Run the Jupyter Notebook
```bash
jupyter notebook "AI Lecture Notes Generator.ipynb"
```
Run all cells in the notebook to start the Gradio interface, then interact with the application through the displayed URL (typically http://127.0.0.1:7860/).
### Option 2: Use the functions directly in your code
You can import the functions from the notebook into your own Python code:
```python
# Import the necessary functions
from AI_Lecture_Notes_Generator import process_audio
# Generate notes from an audio file
notes = process_audio("path_to_lecture_audio.mp3")
print(notes)
```
## Requirements
- Python 3.8+
- PyTorch
- Transformers
- Gradio
- Hugging Face account with appropriate model access
- CUDA-compatible GPU (recommended)
## Output Format
The generated notes follow this structure:
```markdown
# Topic: [Lecture Topic]
## Instructor
[Instructor name if detected]
## Summary
[Concise summary of the lecture content]
## Key Concepts
- [Important concept 1]
- [Important concept 2]
...
## Key Points
- [Major point 1]
- [Major point 2]
...
## Takeaways
- [Takeaway 1]
- [Takeaway 2]
...
```
## Limitations
- Best suited for academic lectures with clear structure
- Audio quality significantly impacts transcription accuracy
- May require fine-tuning for specialized terminology
## License
MIT License.
## Acknowledgements
- OpenAI for the Whisper model
- Meta for the Llama 3.1 model
- Hugging Face for model hosting and libraries
- Gradio for the web interface framework |