Spaces:
Build error
Build error
Upload app.py
Browse files
app.py
CHANGED
|
@@ -21,7 +21,7 @@ from streamlit_autorefresh import st_autorefresh
|
|
| 21 |
# Global parameters
|
| 22 |
# -------------------------
|
| 23 |
IMAGE_DIR = "images" # Folder containing images
|
| 24 |
-
NUM_PAIRS =
|
| 25 |
RESULTS_FILE = "results.csv" # CSV file for saving responses
|
| 26 |
|
| 27 |
# -------------------------
|
|
@@ -193,10 +193,10 @@ if st.session_state.page == "evaluation":
|
|
| 193 |
# st.session_state.page = "detailed_results"
|
| 194 |
# st.rerun()
|
| 195 |
|
| 196 |
-
if st.session_state.submitted == True:
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
|
| 200 |
# st.stop()
|
| 201 |
|
| 202 |
st.stop()
|
|
@@ -259,32 +259,32 @@ if st.session_state.page == "evaluation":
|
|
| 259 |
st.rerun()
|
| 260 |
|
| 261 |
|
| 262 |
-
if st.session_state.page == "detailed_results":
|
| 263 |
-
|
| 264 |
|
| 265 |
-
|
| 266 |
-
|
| 267 |
|
| 268 |
-
|
| 269 |
-
|
| 270 |
-
|
| 271 |
-
|
| 272 |
-
|
| 273 |
|
| 274 |
-
|
| 275 |
-
|
| 276 |
-
|
| 277 |
|
| 278 |
-
|
| 279 |
-
|
| 280 |
-
|
| 281 |
|
| 282 |
-
|
| 283 |
-
|
| 284 |
-
|
| 285 |
-
|
| 286 |
|
| 287 |
-
|
| 288 |
|
| 289 |
|
| 290 |
|
|
|
|
| 21 |
# Global parameters
|
| 22 |
# -------------------------
|
| 23 |
IMAGE_DIR = "images" # Folder containing images
|
| 24 |
+
NUM_PAIRS = 25 # Total number of pairs to be assessed
|
| 25 |
RESULTS_FILE = "results.csv" # CSV file for saving responses
|
| 26 |
|
| 27 |
# -------------------------
|
|
|
|
| 193 |
# st.session_state.page = "detailed_results"
|
| 194 |
# st.rerun()
|
| 195 |
|
| 196 |
+
# if st.session_state.submitted == True:
|
| 197 |
+
# if st.button("See detailed results"):
|
| 198 |
+
# st.session_state.page = "detailed_results"
|
| 199 |
+
# st.rerun()
|
| 200 |
# st.stop()
|
| 201 |
|
| 202 |
st.stop()
|
|
|
|
| 259 |
st.rerun()
|
| 260 |
|
| 261 |
|
| 262 |
+
# if st.session_state.page == "detailed_results":
|
| 263 |
+
# st.title("Detailed Results")
|
| 264 |
|
| 265 |
+
# for i, (pair, result) in enumerate(zip(st.session_state.list_pair_ID, st.session_state.results)):
|
| 266 |
+
# st.markdown(f"### Pair {i+1}")
|
| 267 |
|
| 268 |
+
# col1, col2 = st.columns(2)
|
| 269 |
+
# with col1:
|
| 270 |
+
# st.image(pair[0][1], caption=f"Image 1 ({pair[0][0]})", use_container_width=True)
|
| 271 |
+
# with col2:
|
| 272 |
+
# st.image(pair[1][1], caption=f"Image 2 ({pair[1][0]})", use_container_width=True)
|
| 273 |
|
| 274 |
+
# # Trouver la vraie image
|
| 275 |
+
# real_index = 0 if pair[0][0] == "GT" else 1
|
| 276 |
+
# user_choice_index = 0 if result == 1 else 1 # on suppose que la prédiction est correcte si result==1
|
| 277 |
|
| 278 |
+
# # Afficher les infos
|
| 279 |
+
# st.write(f"**Real image:** Image {real_index+1}")
|
| 280 |
+
# st.write(f"**Your choice:** Image {user_choice_index+1}")
|
| 281 |
|
| 282 |
+
# if result:
|
| 283 |
+
# st.success("✅ Correct")
|
| 284 |
+
# else:
|
| 285 |
+
# st.error("❌ Incorrect")
|
| 286 |
|
| 287 |
+
# st.markdown("---")
|
| 288 |
|
| 289 |
|
| 290 |
|