Spaces:
Sleeping
Sleeping
bug fix for the answers
Browse files
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 |
-
|
|
|
|
|
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)
|