How zhangjiarui530/openeduecnu works
Project Type & Purpose
• The project (named “OpenEduECNU”) appears to be an educational tool aimed at assisting with courseware generation and handling chat-based queries related to coursework. It is structured as a multi-functional application with two main operational modes:
• A “chat_question” module that likely handles interactive dialogue, Q&A, and potentially tutoring functions via a Streamlit UI.
• A “courseware” module that appears to focus on processing educational materials, including generating course outlines, PPTs, and handling file creation and text extraction (e.g., extracting high frequency words).
• The README simply instructs users to run run.py, implying a unified entry point that orchestrates these functionalities.
Analyzing the File Structure
• Top-level Files & Directories:
• run.py: Serves as the main entry point.
• LICENSE and README.md: Standard project documentation.
• .idea: IDE configuration files (not central to the architecture).
• pic: Contains images (perhaps for UI or documentation).
• class_assistant Directory:
• Contains two clearly separated submodules: “chat_question” and “courseware”.
• In “chat_question”: Files such as OpenEduECNU1.py, dialogue.py, question.py, and localApp.py point to components that manage interactive chat-based educational sessions. It also includes a .streamlit folder, indicating a Streamlit-based user interface.
• In “courseware”: Here you have files like OpenEduECNU2.py, courseware.py, creat_file1.py, creat_pptx.py, extract_high_freq_words.py, outlineGenerate.py, pptGenerate.py, and again a localApp.py with its own Streamlit configuration. This module is clearly focused on generating and processing course materials.
• “docs” directory: Contains supporting documents (PDFs, DOCX files) of course materials, possibly serving as source or reference material.
• “result” subdirectory (under courseware): Holds generated output files (e.g., teaching outlines and PPTs) that are created by the application’s processes.
a. Main Components:
– Entry Point: run.py, which initiates the application.
– Chat Module: Under class_assistant/chat_question including components like:
• OpenEduECNU1.py (configures or acts as a controller for chat functionalities)
• dialogue.py and question.py (logic for handling conversation and queries)
• localApp.py paired with Streamlit configuration (UI layer)
– Courseware Module: Under class_assistant/courseware including components like:
• OpenEduECNU2.py (serving a role similar to the chat module’s file but for courseware)
• courseware.py and various utility scripts (creat_file1.py, creat_pptx.py, extract_high_freq_words.py, outlineGenerate.py, pptGenerate.py)
• localApp.py (UI layer for courseware functionalities) with its own Streamlit settings
– Supporting Data/Documents:
• “docs” directory for static educational resources
• “result” directory (within courseware) for dynamically generated documents (teaching outlines and PPTs)
– Configuration/Deployment Elements:
• Presence of .streamlit folders within each module (indicates UI-specific configuration)
• .idea folder (development environment configuration, noted but not essential for the production architecture)
b. Relationships & Interactions:
– Within the courseware module, indicate internal data flows among:
• Input handling (e.g., file uploads or document fetches from the “docs” directory)
• Processing routines (text extraction, outline and PPT generation scripts)
• Output storage to the “result” directory.
– Highlight any shared or common libraries/frameworks being used (especially the reliance on Streamlit for UI).
c. Architectural Patterns & Design Principles:
– Note that the project embodies a modular design, subdividing functionalities into distinct components (chat vs. courseware).
– There is a clear separation between presentation (Streamlit-based UI) and business logic (the various processing scripts and controllers).
d. Relevant Technologies/Frameworks:
– Python is clearly the main programming language.
– Streamlit configuration files (in the .streamlit directories) indicate that the UI is built using the Streamlit framework.
– Other Python libraries (implied by file names such as pptGenerate.py) might include libraries for text processing, generating presentations, and handling document manipulation.