How jlnetosci/ocarctic works
Project type and purpose
• This is a single-process, multi-page Streamlit web application (“OCaRctic”) for interactive image processing and transcription.
• The user uploads or selects example images, then steps through a pipeline: crop, preview, refine, view refined result, get transcription, and see usage tips.
File structure
• Top level
• streamlit_app.py – the Streamlit entrypoint that bootstraps the app and loads pages
• .streamlit/config.toml – Streamlit runtime configuration (theme, server settings)
• requirements.txt & packages.txt – Python and deployment dependencies
• pages/ – six submodules, each representing one page in the app UI (crop.py, preview.py, refine.py, refined.py, transcription.py, tips.py)
• No separate “backend” or database; all logic runs in the same process.
README for additional insights
• Minimal README: confirms it’s a hackathon entry for an open, AI-driven pipeline.
• No external database or microservice architecture is mentioned.
Main components
a. Client (Web Browser)
• Renders the Streamlit UI and handles user file uploads or selections.
b. Streamlit Server (streamlit_app.py + pages/)
• UI Layer: the six pages, each importing UI widgets and canvases.
• Business Logic Layer: image cropping, preview rendering, refinement algorithms, OCR/transcription.
c. Static Asset Store
• examples/ and img/ folders on local disk or container volume.
d. Dependency Layer
• Python environment (packages from requirements.txt).
• Possible external APIs or ML models (if the code calls an external AI inference service).
Relationships and data flows
• User → (HTTP) → Streamlit Server
• On each page:
1. File upload triggers image data passed into the cropping function.
2. Cropped output flows to the preview page.
3. Previewed image is forwarded to the refine algorithm.
4. Refined image is displayed on “refined” page.
5. Final image is sent to OCR/transcription logic on “transcription” page.
• Tips page reads static markdown or configuration to guide user.
• All pages can read/write to a temporary in-memory state or cache on disk.
Architectural patterns and design principles
• Monolithic, event-driven UI where each page is a module under Streamlit’s “pages” feature.
• Clear separation: UI layer (Streamlit widgets) vs. processing layer (image algorithms, OCR).
• Configuration externalized (.streamlit/config.toml, requirements.txt).
• Assets packaged alongside code (examples/, img/).