How charbeldaher34/resumes-ocr works
Main Components
• User Interface: Represented by the Streamlit application (app.py). This is the front-facing component where users provide their Gemini API key, select the directory of CV documents, and trigger the processing.
• Document Processing Core: Shown by the processing modules (processor.py and processor_async.py). These modules encapsulate the logic to parse and extract structured information from the CV documents.
• Gemini AI Integration: Highlight the role of Gemini AI (possibly invoked via gemini_module.py) where the CV document data is analyzed and converted into structured information.
• Data Management: Note that Pandas is used for handling data operations and exporting the results to a CSV file (cv_data.csv). Also indicate the default input documents directory (cvs/) where the CVs are stored.
• Configuration & Dependencies: Include the role of configuration files (pyproject.toml, .gitignore, .python-version, and uv.lock) which manage the project’s dependencies and setup.
Relationships and Interactions
• Processing Flow: The Streamlit UI (app.py) calls upon processor.py (or processor_async.py for future asynchronous processing) to handle file reading, document parsing, and data extraction.
• Data Output: After the processing is finished, the extracted data is managed by Pandas and then exported to a CSV file. Represent this flow from the processing logic to “Data Export (CSV)” storage.
Architectural Patterns and Principles
• Separation of Concerns: Clearly separate the UI (app.py), processing logic (processor.py/processor_async.py), and external integrations (Gemini AI). Each component should be illustrated with proper boundaries.
• API Key and Environment Configuration: Emphasize the importance of configuration settings (GEMINI_API_KEY via a .env file) that feed into the system at runtime.
Relevant Technologies and Frameworks
• Python 3.12+ is the foundation.
• Streamlit for the UI.
• Gemini AI for data extraction.
• PDF and DOCX libraries for document processing.
• Pandas for data management.
• uv tool for dependency management as indicated by uv.lock and usage instructions in the README.
• (Optional) pydantic-ai might be implicitly involved as described in the README.
• From the “CV Documents (cvs/)” to the “Document Processor”.
• From the “Streamlit UI” to call the processor.
• From the “Document Processor” to “Gemini AI” (for data extraction).
• From the “Document Processor” to “Pandas / CSV Export” for saving the output.
• You detail all components as well as data/control flows, staying true to the key architectural elements of the application.