Installation

ToFUL can be used in two ways: through the hosted web application (no installation required) or by running it locally on your own machine.


Option 1 — Hosted Web App

The fastest way to use ToFUL is the hosted Streamlit application. No installation, no dependencies, works on any device with a browser.

→ Open ToFUL on Streamlit


Option 2 — Local Installation

Requirements

  • Python 3.9 or later

  • pip

Step 1 — Clone the repository

git clone https://github.com/pranava-ba/ToFUL.git
cd ToFUL

Step 2 — Install dependencies

pip install -r requirements.txt

The requirements.txt includes:

streamlit>=1.32.0
numpy>=1.24.0
scipy>=1.11.0
sympy>=1.12
mpmath>=1.3.0
plotly>=5.18.0
pandas>=2.0.0

Step 3 — Run the app

streamlit run app.py

The app will open automatically in your browser at http://localhost:8501.

Note

All three files — app.py, core.py, and toful_parser.py — must be in the same directory when you run the app.



Verifying the Installation

To confirm everything is working correctly without launching the UI:

python -c "
import core, toful_parser
import numpy as np

x, _, _ = core.parse_range_input('0,1,2,3,...')
vr = core.validate_drv_probabilities(
    '0.3*(0.7**x) if x>=0 else 0', x[:200], True
)
print('Valid:', vr.is_valid)
print('Sum:  ', round(vr.integral_or_sum, 6))
"

Expected output:

Valid: True
Sum:   1.0

Optional Dependencies

ToFUL automatically uses these packages when available for higher precision and symbolic computation. They are included in requirements.txt but can also be installed separately:

sympy

Enables exact symbolic moment computation for distributions without if/else conditionals (e.g. Normal, Beta). Falls back gracefully to numerical integration if not installed.

mpmath

Enables arbitrary-precision integration for display precision above 12 decimal places. Falls back to SciPy quad if not installed.

Next Steps