CarolineM5 commited on
Commit
9af6198
·
verified ·
1 Parent(s): 6d3398e

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -3
app.py CHANGED
@@ -113,12 +113,15 @@ if st.session_state.page == "evaluation":
113
 
114
 
115
  #Calculating result
116
- correct_guess = np.array(st.session_state.results)
117
-
118
  nb_correct = np.sum(correct_guess)
119
 
120
  st.success(f"Number of correct answers: {nb_correct}/{NUM_PAIRS}")
121
 
 
 
 
 
122
  st.stop()
123
 
124
  st.write(f"Image Pair {st.session_state.current_index+1} of {NUM_PAIRS}")
@@ -139,7 +142,7 @@ if st.session_state.page == "evaluation":
139
  with col2:
140
  st.image(img2, caption="Image 2", use_container_width =True)
141
 
142
- choice = st.radio("Select the **real** image: ", options=["1", "2"], index=None, horizontal = True)
143
 
144
 
145
  if st.button("Next"):
 
113
 
114
 
115
  #Calculating result
116
+ correct_guess = np.array(st.session_state.results)
 
117
  nb_correct = np.sum(correct_guess)
118
 
119
  st.success(f"Number of correct answers: {nb_correct}/{NUM_PAIRS}")
120
 
121
+ d = {'ID_img': rd_ID_list, 'Correct': correct_guess}
122
+ df = pd.DataFrame(data=d)
123
+ df.to_csv(st.session_state.user_name+'.csv')
124
+
125
  st.stop()
126
 
127
  st.write(f"Image Pair {st.session_state.current_index+1} of {NUM_PAIRS}")
 
142
  with col2:
143
  st.image(img2, caption="Image 2", use_container_width =True)
144
 
145
+ choice = st.radio("Select the real image: ", options=["1", "2"], horizontal = True) #, index=None
146
 
147
 
148
  if st.button("Next"):