Spaces:
Sleeping
Sleeping
Daniel Cerda Escobar
commited on
Commit
·
ca0a72f
1
Parent(s):
b7fab1c
Show data
Browse files
app.py
CHANGED
|
@@ -47,6 +47,9 @@ def download_comparison_images():
|
|
| 47 |
|
| 48 |
download_comparison_images()
|
| 49 |
|
|
|
|
|
|
|
|
|
|
| 50 |
if "output_1" not in st.session_state:
|
| 51 |
img_1 = Image.open('plant_pid.png')
|
| 52 |
st.session_state["output_1"] = img_1.resize((4960,3508))
|
|
@@ -55,6 +58,9 @@ if "output_2" not in st.session_state:
|
|
| 55 |
img_2 = Image.open('prediction_visual.png')
|
| 56 |
st.session_state["output_2"] = img_2.resize((4960,3508))
|
| 57 |
|
|
|
|
|
|
|
|
|
|
| 58 |
col1, col2, col3 = st.columns(3, gap='medium')
|
| 59 |
with col1:
|
| 60 |
with st.expander('How to use it'):
|
|
@@ -167,6 +173,22 @@ with col2:
|
|
| 167 |
with tab2:
|
| 168 |
st.image(st.session_state["output_2"])
|
| 169 |
with tab3:
|
| 170 |
-
st.dataframe(
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 171 |
|
| 172 |
|
|
|
|
| 47 |
|
| 48 |
download_comparison_images()
|
| 49 |
|
| 50 |
+
# initialize prediction visual data
|
| 51 |
+
#coco_df =
|
| 52 |
+
|
| 53 |
if "output_1" not in st.session_state:
|
| 54 |
img_1 = Image.open('plant_pid.png')
|
| 55 |
st.session_state["output_1"] = img_1.resize((4960,3508))
|
|
|
|
| 58 |
img_2 = Image.open('prediction_visual.png')
|
| 59 |
st.session_state["output_2"] = img_2.resize((4960,3508))
|
| 60 |
|
| 61 |
+
#if "output_3" not in st.session_state:
|
| 62 |
+
|
| 63 |
+
|
| 64 |
col1, col2, col3 = st.columns(3, gap='medium')
|
| 65 |
with col1:
|
| 66 |
with st.expander('How to use it'):
|
|
|
|
| 173 |
with tab2:
|
| 174 |
st.image(st.session_state["output_2"])
|
| 175 |
with tab3:
|
| 176 |
+
st.dataframe(
|
| 177 |
+
coco_df,
|
| 178 |
+
column_config = {
|
| 179 |
+
'category' : 'Category',
|
| 180 |
+
'score' : 'Confidence',
|
| 181 |
+
},
|
| 182 |
+
hide_index = True,
|
| 183 |
+
)
|
| 184 |
+
st.dataframe(
|
| 185 |
+
output_df,
|
| 186 |
+
column_config = {
|
| 187 |
+
'category' : 'Category',
|
| 188 |
+
'count' : 'Number of Elements',
|
| 189 |
+
'percentage' : '%',
|
| 190 |
+
},
|
| 191 |
+
hide_index = True,
|
| 192 |
+
)
|
| 193 |
|
| 194 |
|