Shruti9756 commited on
Commit
c7bee0f
Β·
verified Β·
1 Parent(s): 72791f4

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -12,7 +12,7 @@ def generate_summary(contract_text):
12
 
13
  # Function to handle feedback and store it in a CSV file
14
  def handle_feedback(feedback_data):
15
- feedback_df = pd.DataFrame(feedback_data, columns=['Contract', 'Summary', 'πŸ‘', 'πŸ‘Ž'])
16
 
17
  # Save the dataframe to a temporary CSV file
18
  temp_csv_path = 'temp_feedback.csv'
@@ -51,11 +51,11 @@ def main():
51
 
52
  # Feedback section
53
  st.subheader("Feedback:")
54
- thumbs_up = st.button("πŸ‘")
55
- thumbs_down = st.button("πŸ‘Ž")
56
 
57
- chosen = "πŸ‘" if thumbs_up else None
58
- rejected = "πŸ‘Ž" if thumbs_down else None
59
 
60
  feedback_data.append((contract_text, summary, chosen, rejected))
61
 
 
12
 
13
  # Function to handle feedback and store it in a CSV file
14
  def handle_feedback(feedback_data):
15
+ feedback_df = pd.DataFrame(feedback_data, columns=['Contract', 'Summary', 'Chosen', 'Rejected'])
16
 
17
  # Save the dataframe to a temporary CSV file
18
  temp_csv_path = 'temp_feedback.csv'
 
51
 
52
  # Feedback section
53
  st.subheader("Feedback:")
54
+ thumbs_up = st.button("πŸ‘ Thumbs Up")
55
+ thumbs_down = st.button("πŸ‘Ž Thumbs Down")
56
 
57
+ chosen = 1 if thumbs_up else 0
58
+ rejected = 1 if thumbs_down else 0
59
 
60
  feedback_data.append((contract_text, summary, chosen, rejected))
61