Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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 =
|
58 |
-
rejected =
|
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 |
|