Vamsi Thiriveedhi
commited on
Commit
•
ebb2700
1
Parent(s):
6434f32
enh: show github readme dynamically for data download instructions
Browse files- filter_data_app.py +20 -2
- requirements.txt +1 -0
filter_data_app.py
CHANGED
@@ -6,6 +6,7 @@ from upsetplot import UpSet
|
|
6 |
import matplotlib.pyplot as plt
|
7 |
import polars as pl
|
8 |
from polars import col, lit
|
|
|
9 |
import seaborn as sns
|
10 |
|
11 |
# Set page configuration
|
@@ -106,6 +107,12 @@ def main():
|
|
106 |
with open("instructions.txt", "r") as file:
|
107 |
instructions = file.read()
|
108 |
st.write(instructions)
|
|
|
|
|
|
|
|
|
|
|
|
|
109 |
with st.sidebar:
|
110 |
st.title("Filters")
|
111 |
|
@@ -373,7 +380,8 @@ def main():
|
|
373 |
|
374 |
# Define the pages
|
375 |
if page == "Summary":
|
376 |
-
st.
|
|
|
377 |
This page of the dashboard presents a summary of the following four rule-based checks applied to over 9.5 million segmentations
|
378 |
from TotalSegmentator(v1) on 125k+ NLST CT scans, displaying the percentage of segmentations passing each check
|
379 |
to highlight potential quality issues
|
@@ -381,7 +389,17 @@ def main():
|
|
381 |
- laterality (confirming correct left/right labeling)
|
382 |
- connected components (verifying single, continuous regions)
|
383 |
- minimum volume from voxel summation (filtering out artifacts smaller than 5mL)
|
384 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
# Execute the SQL to get summary statistics
|
386 |
summary_df = duckdb.query("""
|
387 |
WITH Checks AS (
|
|
|
6 |
import matplotlib.pyplot as plt
|
7 |
import polars as pl
|
8 |
from polars import col, lit
|
9 |
+
import requests
|
10 |
import seaborn as sns
|
11 |
|
12 |
# Set page configuration
|
|
|
107 |
with open("instructions.txt", "r") as file:
|
108 |
instructions = file.read()
|
109 |
st.write(instructions)
|
110 |
+
with st.expander("Data Availability Instructions from GitHub"):
|
111 |
+
url = "https://raw.githubusercontent.com/ImagingDataCommons/CloudSegmentatorResults/main/README.md"
|
112 |
+
response = requests.get(url)
|
113 |
+
instructions = response.text
|
114 |
+
st.write(instructions)
|
115 |
+
|
116 |
with st.sidebar:
|
117 |
st.title("Filters")
|
118 |
|
|
|
380 |
|
381 |
# Define the pages
|
382 |
if page == "Summary":
|
383 |
+
with st.expander("Instructions to navigating the dashboard"):
|
384 |
+
st.write("""
|
385 |
This page of the dashboard presents a summary of the following four rule-based checks applied to over 9.5 million segmentations
|
386 |
from TotalSegmentator(v1) on 125k+ NLST CT scans, displaying the percentage of segmentations passing each check
|
387 |
to highlight potential quality issues
|
|
|
389 |
- laterality (confirming correct left/right labeling)
|
390 |
- connected components (verifying single, continuous regions)
|
391 |
- minimum volume from voxel summation (filtering out artifacts smaller than 5mL)
|
392 |
+
|
393 |
+
Sort the hueristics or search for bodyPart(s) using the options in the sidebar
|
394 |
+
"""
|
395 |
+
)
|
396 |
+
|
397 |
+
with st.expander("Data Availability Instructions from GitHub"):
|
398 |
+
url = "https://raw.githubusercontent.com/ImagingDataCommons/CloudSegmentatorResults/main/README.md"
|
399 |
+
response = requests.get(url)
|
400 |
+
instructions = response.text
|
401 |
+
st.write(instructions)
|
402 |
+
|
403 |
# Execute the SQL to get summary statistics
|
404 |
summary_df = duckdb.query("""
|
405 |
WITH Checks AS (
|
requirements.txt
CHANGED
@@ -3,6 +3,7 @@ matplotlib
|
|
3 |
pandas
|
4 |
polars
|
5 |
pyarrow
|
|
|
6 |
seaborn
|
7 |
streamlit
|
8 |
streamlit_extras
|
|
|
3 |
pandas
|
4 |
polars
|
5 |
pyarrow
|
6 |
+
requests
|
7 |
seaborn
|
8 |
streamlit
|
9 |
streamlit_extras
|