How himmsrathore/streamlet_project works
Project Type and Purpose
• This is a single-repository, full-stack (UI + processing) Python application.
• It uses Streamlit (via app.py) as a lightweight web interface.
• It ingests PDFs and CSVs, converts or “flattens” them, optionally translates English text to Hindi, and emits CSV outputs.
File Structure
• app.py: Streamlit frontend and orchestration layer.
• converter.py, project1_csv_converter.py, project2_pdf_to_csv.py, pdf_converter_test.py: PDF→CSV and CSV→CSV conversion modules and tests.
• train_flatten.py, flattening scripts: flattening/normalizing timetable data.
• eng_to_hindi.py, english_to_hindi_google.py: translation logic (local & Google API).
• *.csv, *.pdf, *.txt: sample inputs & outputs for testing and reference.
• requirements.txt: third-party library list (e.g., streamlit, pandas, google-translate).
README
• Use this opportunity to complement missing documentation.
Main Components & Their Relationships
a. External Actors
• User (Web Browser)
• Google Translate API (for cloud translation)
b. UI Layer
• Streamlit App (app.py)
c. Processing Services
1. PDF-to-CSV Converter
• project2_pdf_to_csv.py
• converter.py
• pdf_converter_test.py (testing)
2. CSV Converter / Flattener
• project1_csv_converter.py
• train_flatten.py
3. Translation Service
• eng_to_hindi.py (local translation logic)
• english_to_hindi_google.py (invokes Google API)
d. Data Storage (local filesystem)
• Input folder (PDFs, CSVs)
• Output folder (generated CSVs)
e. Dependencies
• Python runtime
• Streamlit
• Pandas, PyPDF2 or similar
• Google translate client
Architectural Patterns & Design Principles
• Monolithic modular architecture: clear separation of UI (Streamlit) and processing modules.
• Pipeline pattern: input → convert → flatten → translate → output.
• Test-driven approach for PDF conversion (pdf_converter_test.py).
• Single source of truth: files on disk (no database layer).
Final Checklist
• [ ] User & Browser interface clearly shown.
• [ ] Streamlit App layer with “app.py” label.
• [ ] File Store with Input/Output folders.