Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -16,7 +16,48 @@ def calculate_tia(t1, a1, t2, a2):
|
|
16 |
return result
|
17 |
|
18 |
with gr.Blocks() as demo:
|
19 |
-
gr.Markdown("#
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
20 |
|
21 |
with gr.Row():
|
22 |
t1 = gr.Number(label="Time Point 1 (hours)", value=20)
|
|
|
16 |
return result
|
17 |
|
18 |
with gr.Blocks() as demo:
|
19 |
+
gr.Markdown("#gr.Markdown("""
|
20 |
+
---
|
21 |
+
|
22 |
+
### ℹ️ **What Is This Tool?**
|
23 |
+
|
24 |
+
This free, open-source web application is designed to calculate **Time-Integrated Activity (TIA)** for patients undergoing **Lutetium-177 PSMA therapy** in metastatic prostate cancer. It uses only two post-treatment SPECT imaging time points to produce accurate, personalized dosimetry in resource-constrained settings.
|
25 |
+
|
26 |
+
The tool relies on a simplified yet clinically validated mathematical model (mono-exponential washout), commonly used for organs with regular clearance kinetics such as kidneys or PSMA-positive tumors.
|
27 |
+
|
28 |
+
---
|
29 |
+
|
30 |
+
### ⚙️ **How Does It Work?**
|
31 |
+
|
32 |
+
You simply enter:
|
33 |
+
- Two imaging time points (in hours)
|
34 |
+
- Measured activity for each point (in MBq)
|
35 |
+
|
36 |
+
The tool automatically:
|
37 |
+
- Fits the time–activity curve (TAC) using exponential modeling
|
38 |
+
- Calculates the washout rate (_k_), initial activity (_A₀_), and total time-integrated activity (_TIA = A₀ / k_)
|
39 |
+
- Displays results instantly and clearly
|
40 |
+
|
41 |
+
---
|
42 |
+
|
43 |
+
### 🧠 **Scientific Basis**
|
44 |
+
|
45 |
+
This method applies the following model:
|
46 |
+
|
47 |
+
> **A(t) = A₀ · exp(–k · t)**
|
48 |
+
> **TIA = A₀ / k**
|
49 |
+
|
50 |
+
Where:
|
51 |
+
- _A(t)_ is the activity at time _t_
|
52 |
+
- _A₀_ is the estimated initial activity
|
53 |
+
- _k_ is the washout rate (clearance constant)
|
54 |
+
- _TIA_ is the integrated activity over time used to estimate absorbed radiation dose
|
55 |
+
|
56 |
+
This model is suitable for organs and lesions that exhibit predictable biological clearance and helps support practical dosimetry protocols in clinical or academic environments.
|
57 |
+
|
58 |
+
---
|
59 |
+
""")
|
60 |
+
.")
|
61 |
|
62 |
with gr.Row():
|
63 |
t1 = gr.Number(label="Time Point 1 (hours)", value=20)
|