Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -22,14 +22,11 @@ def handle_feedback(feedback_data, feedback_file):
|
|
22 |
# Save the dataframe to the feedback CSV file
|
23 |
feedback_df.to_csv(feedback_file, mode='a', index=False, header=not st.session_state.feedback_csv_exists)
|
24 |
|
25 |
-
# Display a feedback collected message
|
26 |
-
|
|
|
27 |
|
28 |
-
|
29 |
-
download_button = st.button("Download Feedback CSV")
|
30 |
-
|
31 |
-
# If the download button is clicked, initiate the download
|
32 |
-
if download_button:
|
33 |
st.markdown(get_binary_file_downloader_html(feedback_file, 'Feedback Data'), unsafe_allow_html=True)
|
34 |
|
35 |
# Function to create a download link for a binary file
|
|
|
22 |
# Save the dataframe to the feedback CSV file
|
23 |
feedback_df.to_csv(feedback_file, mode='a', index=False, header=not st.session_state.feedback_csv_exists)
|
24 |
|
25 |
+
# Display a feedback collected message only if thumbs up or thumbs down is clicked
|
26 |
+
if 'π' in feedback_df['π'].values or 'π' in feedback_df['π'].values:
|
27 |
+
st.success("Feedback collected successfully!")
|
28 |
|
29 |
+
# Display a download button for the user
|
|
|
|
|
|
|
|
|
30 |
st.markdown(get_binary_file_downloader_html(feedback_file, 'Feedback Data'), unsafe_allow_html=True)
|
31 |
|
32 |
# Function to create a download link for a binary file
|