Spaces:
Sleeping
Sleeping
bug fix for finish button
Browse files- pages/Ranking.py +2 -3
pages/Ranking.py
CHANGED
@@ -114,7 +114,7 @@ class RankingApp:
|
|
114 |
# save the current progress to session state
|
115 |
if 'progress' not in st.session_state:
|
116 |
st.session_state.progress = {}
|
117 |
-
|
118 |
|
119 |
prompt_tags, tag, prompt_id, items = self.sidebar()
|
120 |
batch_num = len(items) // self.batch_size
|
@@ -183,8 +183,7 @@ class RankingApp:
|
|
183 |
ranking_dataset.push_to_hub('MAPS-research/GEMRec-Ranking', split='train')
|
184 |
|
185 |
if progress == 'finished':
|
186 |
-
st.session_state.progress[
|
187 |
-
st.experimental_rerun()
|
188 |
else:
|
189 |
st.session_state.counter[prompt_id] += 1
|
190 |
|
|
|
114 |
# save the current progress to session state
|
115 |
if 'progress' not in st.session_state:
|
116 |
st.session_state.progress = {}
|
117 |
+
print('current progress: ', st.session_state.progress)
|
118 |
|
119 |
prompt_tags, tag, prompt_id, items = self.sidebar()
|
120 |
batch_num = len(items) // self.batch_size
|
|
|
183 |
ranking_dataset.push_to_hub('MAPS-research/GEMRec-Ranking', split='train')
|
184 |
|
185 |
if progress == 'finished':
|
186 |
+
st.session_state.progress[prompt_id] = 'finished'
|
|
|
187 |
else:
|
188 |
st.session_state.counter[prompt_id] += 1
|
189 |
|