Spaces:
No application file
No application file
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,14 +1,102 @@
|
|
| 1 |
-
|
| 2 |
-
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# π AI Lecture Notes Generator
|
| 2 |
+
|
| 3 |
+
Transform lecture audio into structured, comprehensive notes using AI.
|
| 4 |
+
|
| 5 |
+
## Features
|
| 6 |
+
|
| 7 |
+
- ποΈ Transcribes lecture audio using OpenAI's Whisper Large V3 model
|
| 8 |
+
- π Generates well-structured markdown notes using Meta-Llama-3.1-8B
|
| 9 |
+
- π§ Identifies key concepts, points, and takeaways automatically
|
| 10 |
+
- π Simple web interface built with Gradio
|
| 11 |
+
- β‘ Optimized with 4-bit quantization for efficient inference
|
| 12 |
+
|
| 13 |
+
## Demo
|
| 14 |
+
|
| 15 |
+

|
| 16 |
+
|
| 17 |
+
## How It Works
|
| 18 |
+
|
| 19 |
+
1. **Audio Transcription**: Converts lecture audio to text using Whisper Large V3
|
| 20 |
+
2. **Note Generation**: Processes transcription through Llama 3.1 to create structured notes
|
| 21 |
+
3. **Format Cleaning**: Ensures consistent markdown formatting with proper headers
|
| 22 |
+
|
| 23 |
+
## Installation
|
| 24 |
+
|
| 25 |
+
```bash
|
| 26 |
+
# Clone the repository
|
| 27 |
+
git clone https://github.com/yourusername/ai-lecture-notes-generator.git
|
| 28 |
+
cd ai-lecture-notes-generator
|
| 29 |
+
|
| 30 |
+
# Install dependencies
|
| 31 |
+
pip install -r requirements.txt
|
| 32 |
+
```
|
| 33 |
+
|
| 34 |
+
## Usage
|
| 35 |
+
|
| 36 |
+
### Option 1: Run the web interface
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
python app.py
|
| 40 |
+
```
|
| 41 |
+
|
| 42 |
+
Then open your browser and navigate to the displayed URL (typically http://127.0.0.1:7860/).
|
| 43 |
+
|
| 44 |
+
### Option 2: Use the API programmatically
|
| 45 |
+
|
| 46 |
+
```python
|
| 47 |
+
from lecture_notes_generator import process_audio
|
| 48 |
+
|
| 49 |
+
# Generate notes from an audio file
|
| 50 |
+
notes = process_audio("path_to_lecture_audio.mp3")
|
| 51 |
+
print(notes)
|
| 52 |
+
```
|
| 53 |
+
|
| 54 |
+
## Requirements
|
| 55 |
+
|
| 56 |
+
- Python 3.8+
|
| 57 |
+
- PyTorch
|
| 58 |
+
- Transformers
|
| 59 |
+
- Gradio
|
| 60 |
+
- Hugging Face account with appropriate model access
|
| 61 |
+
- CUDA-compatible GPU (recommended)
|
| 62 |
+
|
| 63 |
+
## Output Format
|
| 64 |
+
|
| 65 |
+
The generated notes follow this structure:
|
| 66 |
+
|
| 67 |
+
```markdown
|
| 68 |
+
# Topic: [Lecture Topic]
|
| 69 |
+
## Instructor
|
| 70 |
+
[Instructor name if detected]
|
| 71 |
+
## Summary
|
| 72 |
+
[Concise summary of the lecture content]
|
| 73 |
+
## Key Concepts
|
| 74 |
+
- [Important concept 1]
|
| 75 |
+
- [Important concept 2]
|
| 76 |
+
...
|
| 77 |
+
## Key Points
|
| 78 |
+
- [Major point 1]
|
| 79 |
+
- [Major point 2]
|
| 80 |
+
...
|
| 81 |
+
## Takeaways
|
| 82 |
+
- [Takeaway 1]
|
| 83 |
+
- [Takeaway 2]
|
| 84 |
+
...
|
| 85 |
+
```
|
| 86 |
+
|
| 87 |
+
## Limitations
|
| 88 |
+
|
| 89 |
+
- Best suited for academic lectures with clear structure
|
| 90 |
+
- Audio quality significantly impacts transcription accuracy
|
| 91 |
+
- May require fine-tuning for specialized terminology
|
| 92 |
+
|
| 93 |
+
## License
|
| 94 |
+
|
| 95 |
+
MIT
|
| 96 |
+
|
| 97 |
+
## Acknowledgements
|
| 98 |
+
|
| 99 |
+
- OpenAI for the Whisper model
|
| 100 |
+
- Meta for the Llama 3.1 model
|
| 101 |
+
- Hugging Face for model hosting and libraries
|
| 102 |
+
- Gradio for the web interface framework
|