ashmib commited on
Commit
b616114
·
verified ·
1 Parent(s): 78db758

bug fix for the answers

Browse files
Files changed (1) hide show
  1. app.py +4 -2
app.py CHANGED
@@ -53,10 +53,12 @@ current_index = st.session_state.current_index
53
  # Display question and options
54
  if 0 <= current_index < len(data):
55
  question = data.loc[current_index, "Question"]
56
- answers = eval(data.loc[current_index, "Generated Answer"]) # Convert string to list of tuples
57
 
58
  st.subheader(f"Question {current_index + 1}: {question}")
59
- selected_answer = st.radio("Choose the best answer:", options=[ans[0] for ans in answers])
 
 
60
 
61
  # Rating
62
  rating = st.slider("Rate the answer (1 = Worst, 5 = Best)", 1, 5, value=3)
 
53
  # Display question and options
54
  if 0 <= current_index < len(data):
55
  question = data.loc[current_index, "Question"]
56
+ # answers = eval(data.loc[current_index, "Generated Answer"]) # Convert string to list of tuples
57
 
58
  st.subheader(f"Question {current_index + 1}: {question}")
59
+ st.subheader("Generated Answer:")
60
+ st.write(data.loc[idx, "Generated Answer"])
61
+ # selected_answer = st.radio("Choose the best answer:", options=[ans[0] for ans in answers])
62
 
63
  # Rating
64
  rating = st.slider("Rate the answer (1 = Worst, 5 = Best)", 1, 5, value=3)