Skip to content

Commit

Permalink
Added logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dschiese committed Aug 2, 2024
1 parent 555b73a commit 9c44c99
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions client.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,6 +223,7 @@ def next_understandability_explanation():
}
response = requests.post(f"{BACKEND_URL}/storeunderstandability/{st.session_state.user_id}/{st.session_state.best_worst_current['tuple']}",json=data, headers={"Content-Type": "application/json"});
if 200 <= response.status_code < 300:
print("Stored best and worst explanations successfully");
st.session_state.understandability_tuples[st.session_state.current_understandability_index]["best"] = data["best"];
st.session_state.understandability_tuples[st.session_state.current_understandability_index]["worst"] = data["worst"];
if(st.session_state.current_understandability_index < len(st.session_state.understandability_tuples) - 1):
Expand All @@ -247,6 +248,7 @@ def previous_understandability_explanation():
if(st.session_state.current_understandability_index > 0):
response = requests.post(f"{BACKEND_URL}/storeunderstandability/{st.session_state.user_id}/{st.session_state.best_worst_current['tuple']}",json=data, headers={"Content-Type": "application/json"});
if 200 <= response.status_code < 300:
print("Stored best and worst explanations successfully");
st.session_state.understandability_tuples[st.session_state.current_understandability_index]["best"] = data["best"];
st.session_state.understandability_tuples[st.session_state.current_understandability_index]["worst"] = data["worst"];
st.session_state.current_understandability_index -= 1;
Expand Down

0 comments on commit 9c44c99

Please sign in to comment.