Spaces:
Sleeping
Sleeping
Commit
·
fbb993d
1
Parent(s):
c4c7997
submit text directly
Browse files- src/app.py +4 -0
src/app.py
CHANGED
|
@@ -396,6 +396,10 @@ def main():
|
|
| 396 |
rec1.get('ground_truth', ''), comments
|
| 397 |
]
|
| 398 |
def submit_feedback():
|
|
|
|
|
|
|
|
|
|
|
|
|
| 399 |
append_feedback(feedback_path, header, row)
|
| 400 |
st.session_state.idx += 1
|
| 401 |
st.session_state.feedback_saved = True
|
|
|
|
| 396 |
rec1.get('ground_truth', ''), comments
|
| 397 |
]
|
| 398 |
def submit_feedback():
|
| 399 |
+
# Get the current text box content at the time of submission
|
| 400 |
+
current_comments = st.session_state.get(f"comments_{idx}", "")
|
| 401 |
+
# Update the row with the current comments
|
| 402 |
+
row[9] = current_comments # comments is at index 9
|
| 403 |
append_feedback(feedback_path, header, row)
|
| 404 |
st.session_state.idx += 1
|
| 405 |
st.session_state.feedback_saved = True
|