blessedpug commited on
Commit
98b2898
·
1 Parent(s): 8ecd8d5

Added flowchart diagram

Browse files
Files changed (1) hide show
  1. flowchart.md +49 -0
flowchart.md ADDED
@@ -0,0 +1,49 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ graph TD
2
+ subgraph User_Interface[User Interface - Gradio]
3
+ UI_AppPy["app.py (Gradio UI)"]
4
+ UI_Uploads["Image/Form Uploads (Receipts, Child Fee, Medical)"]
5
+ UI_Inputs["User Inputs (Employee Details, etc.)"]
6
+ UI_Outputs["Processed Info / Filled PDFs"]
7
+ end
8
+
9
+ subgraph Processing_Pipeline[Processing Pipeline]
10
+ P_PipelinePy["pipeline.py"]
11
+ P_OpenAI["OpenAI GPT-4o (Image to Text & Structured Data Extraction)"]
12
+ P_ModelsPy["models.py (Pydantic Data Models)"]
13
+ P_FormFillPy["form_fill.py (PDF Population)"]
14
+ P_FraudPy["fraud.py (Fraud Detection)"]
15
+ P_DataJson["data.json (Storage for Processed Receipts)"]
16
+ P_TemplatesDir["templates/ (PDF Templates)"]
17
+ P_OutputsDir["outputs/ (Generated PDFs)"]
18
+ end
19
+
20
+ UI_AppPy --> P_PipelinePy;
21
+
22
+ UI_Uploads --> P_PipelinePy;
23
+ UI_Inputs -- Employee Data etc. --> P_PipelinePy;
24
+ P_PipelinePy -- Extracted Info / PDF Paths --> UI_Outputs;
25
+
26
+ P_PipelinePy -- Sends Image Data --> P_OpenAI;
27
+ P_OpenAI -- Returns Structured JSON --> P_PipelinePy;
28
+ P_PipelinePy -- Validates/Uses --> P_ModelsPy;
29
+ P_PipelinePy -- Sends Data for PDF --> P_FormFillPy;
30
+ P_FormFillPy -- Uses PDF Templates from --> P_TemplatesDir;
31
+ P_FormFillPy -- Saves Filled PDF to --> P_OutputsDir;
32
+ P_PipelinePy -- Sends Receipt Data for Fraud Check --> P_FraudPy;
33
+ P_FraudPy -- Loads/Saves Receipt Data --> P_DataJson;
34
+ P_FraudPy -- Returns Fraud Status --> P_PipelinePy;
35
+
36
+ P_TemplatesDir -.-> P_FormFillPy;
37
+ P_OutputsDir <-.- P_FormFillPy;
38
+ P_DataJson -.-> P_FraudPy;
39
+
40
+ %% Styling
41
+ classDef ui fill:#D6EAF8,stroke:#3498DB,stroke-width:2px;
42
+ classDef process fill:#D5F5E3,stroke:#2ECC71,stroke-width:2px;
43
+ classDef external fill:#FCF3CF,stroke:#F1C40F,stroke-width:2px;
44
+ classDef storage fill:#EBDEF0,stroke:#8E44AD,stroke-width:2px;
45
+
46
+ class UI_AppPy,UI_Uploads,UI_Inputs,UI_Outputs ui;
47
+ class P_PipelinePy,P_ModelsPy,P_FormFillPy,P_FraudPy process;
48
+ class P_OpenAI external;
49
+ class P_DataJson,P_TemplatesDir,P_OutputsDir storage;