make app simpler
Browse files
app.py
CHANGED
@@ -1,28 +1,11 @@
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
3 |
-
import matplotlib.pyplot as plt
|
4 |
|
5 |
-
# Load the data
|
6 |
-
df = pd.read_excel("metrics.xlsx")
|
7 |
-
|
8 |
-
st.title("Ontology Benchmark Metrics Viewer")
|
9 |
|
10 |
-
|
11 |
-
st.subheader("Metrics Table")
|
12 |
-
st.dataframe(df, use_container_width=True)
|
13 |
|
14 |
-
#
|
15 |
-
|
16 |
-
|
17 |
-
# Select a metric to visualize
|
18 |
-
st.subheader("Metric Visualization")
|
19 |
-
selected_metric = st.selectbox("Select a metric column:", numeric_cols)
|
20 |
|
21 |
-
#
|
22 |
-
|
23 |
-
df_sorted = df.sort_values(by=selected_metric, ascending=False)
|
24 |
-
ax.barh(df_sorted['Ontology ID'], df_sorted[selected_metric])
|
25 |
-
ax.set_xlabel(selected_metric)
|
26 |
-
ax.set_ylabel("Ontology ID")
|
27 |
-
ax.set_title(f"{selected_metric} by Ontology")
|
28 |
-
st.pyplot(fig)
|
|
|
1 |
import streamlit as st
|
2 |
import pandas as pd
|
|
|
3 |
|
|
|
|
|
|
|
|
|
4 |
|
5 |
+
st.title("OntoLearner Benchmark Metrics")
|
|
|
|
|
6 |
|
7 |
+
# Load the Excel file
|
8 |
+
df = pd.read_excel("metrics.xlsx")
|
|
|
|
|
|
|
|
|
9 |
|
10 |
+
# Display as a table
|
11 |
+
st.dataframe(df, use_container_width=True)
|
|
|
|
|
|
|
|
|
|
|
|