# sivagoshikadevi76-cell/h2s_ltm_project architecture

> Architecture diagram of the GitHub repository sivagoshikadevi76-cell/h2s_ltm_project, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-26). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sivagoshikadevi76-cell/h2s_ltm_project
- Repository: https://github.com/sivagoshikadevi76-cell/h2s_ltm_project

## Overview

A proof-of-concept H₂S cumulative-dose forecaster, exposed both as a Streamlit interface and as a standalone script. Both generate synthetic worker data, train an LSTM on seven-day dose/temperature/humidity windows, and compare predictions with actual dose; the Streamlit app also displays a next-day forecast and charts. This is not a validated safety tool. The app excerpt omits some wiring, so only clear calls and documented workflow links are shown.

Main entry points: [`app.py`](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py) (Streamlit app), [`lstm_dose_predictor.py`](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/lstm_dose_predictor.py) (Standalone runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_streamlit["Streamlit app<br/>[app.py]"]
  node_app_results["Forecast charts<br/>[app.py]"]
  node_script["Standalone runner"]
  node_script_demo["Demo predictions"]
end

subgraph group_data["Synthetic data"]
  node_app_generator["Worker generator<br/>[app.py]"]
  node_app_dataset["Training dataset<br/>[app.py]"]
  node_script_data["Synthetic dataset"]
end

subgraph group_model["Forecasting"]
  node_app_trainer["App training<br/>[app.py]"]
  node_app_model["App LSTM<br/>[app.py]"]
  node_app_predict["App forecasts<br/>[app.py]"]
  node_script_model["Dose LSTM"]
  node_script_train["Script training"]
end

node_user(("User"))
node_model_file["Saved weights"]

node_user -->|"uses"| node_streamlit
node_streamlit -->|"starts training"| node_app_trainer
node_app_trainer -->|"builds examples"| node_app_dataset
node_app_dataset -->|"generates workers"| node_app_generator
node_app_trainer -->|"trains"| node_app_model
node_streamlit -->|"runs forecast"| node_app_predict
node_app_predict -->|"predicts with"| node_app_model
node_streamlit -->|"displays results"| node_app_results
node_user -->|"runs"| node_script
node_script -->|"calls"| node_script_train
node_script_train -->|"builds data"| node_script_data
node_script_data -->|"trains"| node_script_model
node_script -->|"runs demo"| node_script_demo
node_script_demo -->|"predicts with"| node_script_model
node_script -->|"saves weights"| node_model_file

click node_streamlit "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py"
click node_app_trainer "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py"
click node_app_model "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py"
click node_app_predict "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py"
click node_app_results "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py"
click node_app_generator "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py"
click node_app_dataset "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py"
click node_script "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/lstm_dose_predictor.py"
click node_script_data "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/lstm_dose_predictor.py"
click node_script_model "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/lstm_dose_predictor.py"
click node_script_train "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/lstm_dose_predictor.py"
click node_script_demo "https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/lstm_dose_predictor.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_streamlit,node_app_results,node_script,node_script_demo,node_user toneBlue
class node_app_generator,node_app_dataset,node_script_data toneAmber
class node_app_trainer,node_app_model,node_app_predict,node_script_model,node_script_train toneMint
class node_model_file toneIndigo
```

## Components

### User interface

- [Streamlit app](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py): `app.py`
- [Forecast charts](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py): `app.py`
- [Standalone runner](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/lstm_dose_predictor.py): `lstm_dose_predictor.py`
- [Demo predictions](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/lstm_dose_predictor.py): `lstm_dose_predictor.py`

### Synthetic data

- [Worker generator](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py): `app.py`
- [Training dataset](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py): `app.py`
- [Synthetic dataset](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/lstm_dose_predictor.py): `lstm_dose_predictor.py`

### Forecasting

- [App training](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py): `app.py`
- [App LSTM](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py): `app.py`
- [App forecasts](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/app.py): `app.py`
- [Dose LSTM](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/lstm_dose_predictor.py): `lstm_dose_predictor.py`
- [Script training](https://github.com/sivagoshikadevi76-cell/h2s_ltm_project/blob/main/lstm_dose_predictor.py): `lstm_dose_predictor.py`

### Other components

- **User**
- **Saved weights**

## Connections

- User → Streamlit app: uses
- Streamlit app → App training: starts training
- App training → Training dataset: builds examples
- Training dataset → Worker generator: generates workers
- App training → App LSTM: trains
- Streamlit app → App forecasts: runs forecast
- App forecasts → App LSTM: predicts with
- Streamlit app → Forecast charts: displays results
- User → Standalone runner: runs
- Standalone runner → Script training: calls
- Script training → Synthetic dataset: builds data
- Synthetic dataset → Dose LSTM: trains
- Standalone runner → Demo predictions: runs demo
- Demo predictions → Dose LSTM: predicts with
- Standalone runner → Saved weights: saves weights
