Spaces:
Runtime error
Runtime error
Added documentation
Browse files- Home.py +6 -4
- dashboard.py +16 -0
- pages/02_Tool.py +1 -1
- pages/__pycache__/01_Documentation.cpython-312.pyc +0 -0
- pages/__pycache__/02_Glossary.cpython-312.pyc +0 -0
Home.py
CHANGED
|
@@ -80,17 +80,19 @@ if st.session_state.authenticated:
|
|
| 80 |
col1, col2 = st.columns(2)
|
| 81 |
|
| 82 |
with col1:
|
|
|
|
|
|
|
| 83 |
st.markdown("""
|
| 84 |
-
<div
|
| 85 |
-
<h3>Documentation</h3>
|
| 86 |
<p>Learn how the analysis works, how to use the tool, and what features are available</p>
|
| 87 |
</div>
|
| 88 |
""", unsafe_allow_html=True)
|
| 89 |
|
| 90 |
with col2:
|
|
|
|
|
|
|
| 91 |
st.markdown("""
|
| 92 |
-
<div
|
| 93 |
-
<h3>Analysis Tool</h3>
|
| 94 |
<p>Generate visualizations and analyze task similarity for various sensor configurations</p>
|
| 95 |
</div>
|
| 96 |
""", unsafe_allow_html=True)
|
|
|
|
| 80 |
col1, col2 = st.columns(2)
|
| 81 |
|
| 82 |
with col1:
|
| 83 |
+
if st.button("📚 Documentation", key="doc_button", use_container_width=True):
|
| 84 |
+
st.switch_page("pages/01_Documentation.py")
|
| 85 |
st.markdown("""
|
| 86 |
+
<div style="text-align: center; padding: 10px; border: 1px solid #e0e0e0; border-radius: 5px; margin-top: -10px;">
|
|
|
|
| 87 |
<p>Learn how the analysis works, how to use the tool, and what features are available</p>
|
| 88 |
</div>
|
| 89 |
""", unsafe_allow_html=True)
|
| 90 |
|
| 91 |
with col2:
|
| 92 |
+
if st.button("🔧 Analysis Tool", key="tool_button", use_container_width=True):
|
| 93 |
+
st.switch_page("pages/02_Tool.py")
|
| 94 |
st.markdown("""
|
| 95 |
+
<div style="text-align: center; padding: 10px; border: 1px solid #e0e0e0; border-radius: 5px; margin-top: -10px;">
|
|
|
|
| 96 |
<p>Generate visualizations and analyze task similarity for various sensor configurations</p>
|
| 97 |
</div>
|
| 98 |
""", unsafe_allow_html=True)
|
dashboard.py
CHANGED
|
@@ -6,6 +6,7 @@ import sys
|
|
| 6 |
import numpy as np
|
| 7 |
import matplotlib.pyplot as plt
|
| 8 |
import seaborn as sns
|
|
|
|
| 9 |
from multivariate_gaussian_overlap import calculate_similarity_portrait_abstraction
|
| 10 |
from plot_similarity import plot_similarity_measure
|
| 11 |
from sensor_illustration import LegIllustration
|
|
@@ -632,6 +633,21 @@ if st.session_state.authenticated:
|
|
| 632 |
task_y_name=task1_name_backend[0]
|
| 633 |
)
|
| 634 |
axs[1,1].set_title("Input Similarity")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 635 |
|
| 636 |
# Ax[1,2]: Conflict Heatmap
|
| 637 |
if show_conflict and conflict_main is not None:
|
|
|
|
| 6 |
import numpy as np
|
| 7 |
import matplotlib.pyplot as plt
|
| 8 |
import seaborn as sns
|
| 9 |
+
from mpl_toolkits.axes_grid1 import make_axes_locatable
|
| 10 |
from multivariate_gaussian_overlap import calculate_similarity_portrait_abstraction
|
| 11 |
from plot_similarity import plot_similarity_measure
|
| 12 |
from sensor_illustration import LegIllustration
|
|
|
|
| 633 |
task_y_name=task1_name_backend[0]
|
| 634 |
)
|
| 635 |
axs[1,1].set_title("Input Similarity")
|
| 636 |
+
|
| 637 |
+
# Add a bar plot showing input similarity value
|
| 638 |
+
# Calculate the average input similarity
|
| 639 |
+
avg_input_similarity = np.mean(input_similarity)
|
| 640 |
+
# Create a small subplot above the heatmap for the bar plot
|
| 641 |
+
divider = make_axes_locatable(axs[1,1])
|
| 642 |
+
ax_bar = divider.append_axes("top", size="15%", pad=0.2)
|
| 643 |
+
# Create the bar plot
|
| 644 |
+
ax_bar.barh(y=0, width=avg_input_similarity, height=0.5, color='red')
|
| 645 |
+
ax_bar.set_xlim(0, 1)
|
| 646 |
+
ax_bar.set_ylim(-0.5, 0.5)
|
| 647 |
+
ax_bar.set_yticks([])
|
| 648 |
+
ax_bar.set_xticks([0, 0.25, 0.5, 0.75, 1.0])
|
| 649 |
+
ax_bar.set_title(f"Avg. Input Similarity: {avg_input_similarity:.2f}", fontsize=9)
|
| 650 |
+
ax_bar.grid(axis='x', linestyle='--', alpha=0.7)
|
| 651 |
|
| 652 |
# Ax[1,2]: Conflict Heatmap
|
| 653 |
if show_conflict and conflict_main is not None:
|
pages/02_Tool.py
CHANGED
|
@@ -628,7 +628,7 @@ if st.session_state.authenticated:
|
|
| 628 |
task_y_name=task1_name_backend[0]
|
| 629 |
)
|
| 630 |
axs[1,1].set_title("Input Similarity")
|
| 631 |
-
|
| 632 |
# Ax[1,2]: Conflict Heatmap
|
| 633 |
if show_conflict and conflict_main is not None:
|
| 634 |
plot_similarity_measure(
|
|
|
|
| 628 |
task_y_name=task1_name_backend[0]
|
| 629 |
)
|
| 630 |
axs[1,1].set_title("Input Similarity")
|
| 631 |
+
|
| 632 |
# Ax[1,2]: Conflict Heatmap
|
| 633 |
if show_conflict and conflict_main is not None:
|
| 634 |
plot_similarity_measure(
|
pages/__pycache__/01_Documentation.cpython-312.pyc
ADDED
|
Binary file (56.2 kB). View file
|
|
|
pages/__pycache__/02_Glossary.cpython-312.pyc
ADDED
|
Binary file (15.8 kB). View file
|
|
|