Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

teach users to run inference app locally #236

Merged
merged 4 commits into from
Jun 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/os-unittests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.9
- name: Set up Python 3.10
uses: actions/setup-python@v2
with:
python-version: 3.9
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ In this package, we use branching processes to model the time-dependent reproduc
All features of our software are described in detail in our
[full API documentation](https://branchpro.readthedocs.io/en/latest/).

<!---
A web app for performing inference for branching process models can be found [here](https://sabs-r3-epidemiology.github.io/branchpro/).
-->

A web app for performing inference for branching process models is included in this package. Instructions for accessing the app are available [here](https://sabs-r3-epidemiology.github.io/branchpro/).


More details on branching process models and inference can be found in these
papers:
Expand Down
2 changes: 1 addition & 1 deletion branchpro/apps/inference_dash_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,4 +300,4 @@ def toggle_modal_si(n1, n2, is_open):


if __name__ == "__main__":
app.app.run_server(debug=True)
app.app.run_server(debug=True, host='127.0.0.1', port=8050)
4 changes: 2 additions & 2 deletions branchpro/apps/simulation_dash_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
# notice and full license details.
#
"""This is an app which shows forward simulation of the branching process model
with fixed example data. To run the app, use ``python dash_app.py``.
with fixed example data. To run the app, use ``python simulation_dash_app.py``.
"""

import os
Expand Down Expand Up @@ -199,4 +199,4 @@ def toggle_modal_si(n1, n2, is_open):


if __name__ == "__main__":
app.app.run_server(debug=True)
app.app.run_server(debug=True, host='127.0.0.1', port=8050)
11 changes: 9 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,17 @@
<h2 class="title">Inference Web App for Branching Processes</h2>
<hr>
<p>
To access our online software application, please click <a href="https://branchproinf.herokuapp.com">here.</a>
To access the software repository for the branchpro Python package, please visit the Github <a href="https://github.com/SABS-R3-Epidemiology/branchpro">here.</a>
</p>
<p>
To access the software repository for the branchpro Python package, please click <a href="https://github.com/SABS-R3-Epidemiology/branchpro">here.</a>
<span style="color:red;">The online web server for the branchpro inference app is currently down.</span> To access the app locally in your browser, please install the branchpro software (see Github link above) and then execute the following command:
</p>
<pre style="margin-left: 30px;"><code>python branchpro/apps/inference_dash_app.py</code></pre>
<p>
Subsequently, navigate to the address <code>http://127.0.0.1:8050/</code> on your preferred web browser to access the app.
</p>
<p>
Alternatively, all the functionality of the app can be accessed in Python code using the branchpro package; please refer to the <a href="https://branchpro.readthedocs.io/en/latest/" target=”_blank”>API documentation.</a>
</p>
<p>
The authors request users to cite the original publication when referring to the software application, any results generated from it, or any of the code on which this tool is based:
Expand Down
Loading