The AI-Based Lesson Planner is a tool designed to automate the creation of structured lesson plans using OCR (Optical Character Recognition) and NLP (Natural Language Processing). It extracts data from academic calendars and syllabi, processes it, and generates customizable lesson plans in multiple formats (JSON, PDF, Excel, Word, Image).
- Features
- Project Setup Steps
- Usage Instructions
- Folder Structure
- Dependencies
- Contributing
- License
- Contact
- Extracts text from uploaded images of academic calendars and syllabi using OCR.
- Parses extracted data to identify key dates, holidays, events, topics, and subtopics.
- Generates structured lesson plans with customizable fields (e.g., Method, Student Activity, Assessment Tool).
- Supports dynamic editing of generated lesson plans.
- Exports lesson plans in multiple formats: JSON, PDF, Excel, Word, and Image.
Before setting up the project, ensure you have the following installed:
- Python 3.8 or higher
- Tesseract OCR (for text extraction from images)
- A modern web browser
Download and install Tesseract from here.
brew install tesseractsudo apt-get install tesseract-ocrgit clone https://github.com/your-repo-url/AIBasedLessonPlanner.git
cd AIBasedLessonPlannerpython -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activatepip install -r requirements.txtIf you're on Windows, update the Tesseract path in the code. Open the app.py file and modify the following line:
pytesseract.pytesseract.tesseract_cmd = r"C:\\Program Files\\Tesseract-OCR\\tesseract.exe"Replace the path with the actual installation path of Tesseract on your system.
python app.pyBy default, the application will run on http://127.0.0.1:8000. Open this URL in your web browser to access the application.
- Navigate to the
/upload_calendarroute. - Upload an image or text file containing the academic calendar.
- The system will extract key dates, holidays, and events.
- Navigate to the
/upload_syllabusroute. - Upload an image or text file containing the syllabus.
- The system will parse topics and subtopics.
- Use the
/edit_calendarroute to review and edit the extracted data.
- Navigate to the
/final_planroute to view and edit the generated lesson plan.
- Use the
/download_lesson_planroute to download the lesson plan in your preferred format (JSON, PDF, Excel, Word, Image).
AIBasedLessonPlanner/
├── app.py # Main Flask application file
├── requirements.txt # List of Python dependencies
├── uploads/ # Directory for uploaded files
├── data/ # Directory for storing intermediate JSON files
├── templates/ # HTML templates for rendering pages
│ ├── index.html # Homepage
│ ├── upload_calendar.html
│ ├── upload_syllabus.html
│ ├── edit_calendar.html
│ ├── final.html
│ └── download.html
└── README.md # This file
All required Python packages are listed in the requirements.txt file:
Flask==2.3.2
pytesseract==0.3.10
Pillow==9.5.0
pandas==1.5.3
numpy==1.23.5
openpyxl==3.1.2
reportlab==4.0.4
docx==0.2.4
requests==2.31.0
spacy==3.5.0
regex==2023.10.3
To install these dependencies, run:
pip install -r requirements.txtWe welcome contributions from the community! To contribute:
- Fork the repository.
- Create a new branch for your feature or bug fix:
git checkout -b feature/your-feature-name
- Commit your changes:
git commit -m "Add your commit message here" - Push your changes to your fork:
git push origin feature/your-feature-name
- Submit a pull request to the main repository.
