anonymous-researcher912 commited on
Commit
32e9007
1 Parent(s): cf3b6c5

fix version bug

Browse files
Files changed (1) hide show
  1. app.py +6 -13
app.py CHANGED
@@ -11,7 +11,10 @@ max_index = 108
11
  if 'index' not in st.session_state:
12
  st.session_state.index = 1
13
 
14
- buttons = st.columns([2, 1, 6])
 
 
 
15
 
16
  with buttons[1]:
17
  # Number input for navigation
@@ -22,20 +25,10 @@ with buttons[1]:
22
  value=st.session_state.index,
23
  key="index_input",
24
  help="Enter an index and jump to that index.",
25
- step=1 # Increment by 1
26
  )
27
 
28
- with buttons[0]:
29
- st.markdown("# HumanEval-V Viewer")
30
-
31
-
32
- # Check if the input differs from the current session state and update it
33
- if index_input != st.session_state.index:
34
- st.session_state.index = index_input
35
- st.experimental_rerun()
36
-
37
-
38
- coding_task = humaneval_v_data[st.session_state.index-1]
39
  qid = coding_task["qid"]
40
  image = coding_task["image"]
41
  function_signature = coding_task["function_signature"]
 
11
  if 'index' not in st.session_state:
12
  st.session_state.index = 1
13
 
14
+ buttons = st.columns([2, 1.1, 5.9])
15
+
16
+ with buttons[0]:
17
+ st.markdown("# HumanEval-V Viewer")
18
 
19
  with buttons[1]:
20
  # Number input for navigation
 
25
  value=st.session_state.index,
26
  key="index_input",
27
  help="Enter an index and jump to that index.",
28
+ step=1
29
  )
30
 
31
+ coding_task = humaneval_v_data[index_input-1]
 
 
 
 
 
 
 
 
 
 
32
  qid = coding_task["qid"]
33
  image = coding_task["image"]
34
  function_signature = coding_task["function_signature"]