Sari la conținut

Project Concept: BioCoursesGenerator

Overview

BioCoursesGenerator is a Streamlit-based web application designed to automate the generation of educational course materials from scanned curriculum documents. The system leverages Optical Character Recognition (OCR) for text extraction, Large Language Model (LLM) processing for content structuring, and PDF generation to produce comprehensive course books for medical and nursing education.

Core Functionality

  1. Curriculum Input Processing
  2. Accepts scanned PDF or image files containing tabular curriculum structures
  3. Performs image preprocessing including automatic rotation correction for crooked scans
  4. Performs OCR extraction (via Tesseract) to convert images to editable text
  5. Recognizes hierarchical lesson structures through LLM analysis

  6. Content Structuring via LLM

  7. Sends extracted curriculum text to LLM API for processing
  8. Generates structured Table of Contents (TOC) with hierarchical sections and detailed content prompts
  9. API Endpoint: http://127.0.0.1:7998/gpt_generate_book_toc_with_prompts
  10. Request format: ``json { "context": "Create a course for post-graduate medical students", "what_to_build": "Generate lessons covering systematic progression through nursing interventions, surgical care, orthopedic treatment, trauma management, care plan evaluation, intervention assessment, chronic problem restructuring, quality evaluation. Total time: 8 hours. Domains: General Surgery (2h), Orthopedics & Trauma (2h), Urinary System Disorders...", "language": "romana" }
  11. Response provides link to generated TOC file with specific format: numbered sections followed by #!# and detailed content prompts

  12. TOC Modification (Future Implementation)

  13. Allow users to edit generated TOC: add/remove/rename sections
  14. Modify prompts and reorganize structure
  15. Implement tree-based editing interface

  16. PDF Book Generation

  17. Send TOC to PDF generation API
  18. Endpoint: http://127.0.0.1:7998/gpt_toc_to_pdf
  19. Request: {"link": "toc_file_url"}
  20. Downloads generated PDF to /outputs/ directory

Technical Architecture Components

Frontend

  • Streamlit web interface for file upload and processing control

Backend Processing

  • OCR module using pytesseract
  • LLM API integration for content structuring
  • PDF generation and download handling

Data Flow

Scanned Document → OCR Extraction → LLM Content Processing → TOC Generation → User Editing (optional) → PDF Compilation → Download

Nice-to-Have Features

  • Pre-processing text editing interface for manual corrections/removals before LLM processing
  • TOC visualization and manipulation in tree format
  • Document upload to server for link-based API consumption