Skip to content

Sampai28/Course-graph-explorer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📚 Course Prerequisite Graph Explorer

A knowledge graph-based tool that extracts topics from course slides and visualizes them as an interactive prerequisite graph with depth-filtered learning resources.

🎯 What It Does

  1. Upload your course slides (PDF or PPTX)
  2. Extract topics and their relationships using AI (OpenAI GPT)
  3. Visualize topics as an interactive knowledge graph
  4. Filter by difficulty level (Beginner → Intermediate → Advanced)
  5. Access curated learning resources for each topic

🖼️ Screenshots

┌─────────────────────────────────────────────────────────────┐
│  [Settings Sidebar]          │    [Interactive Graph]      │
│                              │                             │
│  • Upload PDF/PPTX           │     🟢 Beginner nodes       │
│  • Enter API Key             │     🟡 Intermediate nodes   │
│  • Select Depth Level        │     🔴 Advanced nodes       │
│  • Extract Topics Button     │                             │
│                              ├─────────────────────────────│
│                              │    [Resources Panel]        │
│                              │    • Beginner links         │
│                              │    • Intermediate links     │
│                              │    • Advanced links         │
└─────────────────────────────────────────────────────────────┘

🚀 Quick Start

1. Clone the Repository

git clone https://github.com/yourusername/course-graph-explorer.git
cd course-graph-explorer

2. Create Virtual Environment (Recommended)

python -m venv venv

# Windows
venv\Scripts\activate

# Mac/Linux
source venv/bin/activate

3. Install Dependencies

pip install -r requirements.txt

4. Run the App

streamlit run app.py

5. Open in Browser

Navigate to http://localhost:8501

📁 Project Structure

course-graph-explorer/
│
├── app.py                  # Main Streamlit application
├── requirements.txt        # Python dependencies
├── README.md               # This file
│
├── data/
│   └── resources.json      # Auto-saved learning resources
│
├── src/
│   ├── __init__.py         # Package initializer
│   ├── parser.py           # PDF/PPTX text extraction
│   └── extractor.py        # LLM topic extraction + resource fetching
│
└── samples/
    └── sample_slides.pdf   # Example slides for testing

⚙️ Configuration

OpenAI API Key

  1. Get your API key from OpenAI Platform
  2. Enter it in the sidebar when running the app

Note: Without an API key, the app uses a mock extractor with sample data for demonstration.

Supported File Types

Format Extension Notes
PDF .pdf Works with text-based PDFs
PowerPoint .pptx Extracts text from all slides

🎨 Features

Depth-Based Filtering

Level Color Description
🟢 Beginner Green Foundational concepts everyone should know first
🟡 Intermediate Yellow Core concepts that build on basics
🔴 Advanced Red Deep/specialized topics requiring prior knowledge

Interactive Graph

  • Click nodes to highlight connections
  • Drag nodes to rearrange layout
  • Hover for topic details
  • Zoom in/out with scroll wheel

Learning Resources

For each topic, get curated links at all difficulty levels:

  • Beginner: YouTube tutorials
  • Intermediate: GeeksforGeeks, tutorials
  • Advanced: Documentation, research papers

🛠️ Tech Stack

Component Technology
Frontend Streamlit
Graph Visualization Pyvis + NetworkX
PDF Parsing PyMuPDF (fitz)
PPTX Parsing python-pptx
AI Extraction OpenAI GPT-4o-mini
Data Storage JSON

📝 Usage Examples

Example 1: Algorithm Course

  1. Upload algorithms_lecture.pdf
  2. Click "Extract Topics"
  3. View graph: Intro → Big-O → Sorting → Graph Algorithms → Dynamic Programming
  4. Filter to "Beginner" to see only foundational topics

Example 2: Machine Learning Course

  1. Upload ml_slides.pptx
  2. Extract topics
  3. Explore prerequisites: Linear Algebra → Statistics → Regression → Neural Networks

🐛 Troubleshooting

Issue Solution
"No module named 'fitz'" Run pip install PyMuPDF
OpenAI quota exceeded Add credits at platform.openai.com or use mock mode
Resources not showing Delete data/resources.json and re-extract
Graph not rendering Refresh the page or restart Streamlit

🤝 Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit changes (git commit -m 'Add amazing feature')
  4. Push to branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

Built with ❤️ for learners who want to master any subject systematically.

About

A knowledge graph-based tool that extracts topics from course slides and visualizes them as an interactive prerequisite graph with depth-filtered learning resources.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors