simonn8 commited on
Commit
c87d818
1 Parent(s): f009353

added key to call

Browse files
Files changed (1) hide show
  1. app.py +2 -3
app.py CHANGED
@@ -98,9 +98,8 @@ else:
98
  if user == "your.email@provider.com":
99
  st.sidebar.error(f"Please provide your email adress")
100
  else:
101
- fernet = Fernet(FERNET_KEY)
102
- encrypted_user = encrypt_message(user)
103
- assert user == decrypt_message(encrypted_user), "decoded is different from original"
104
  with open("rate_results.jsonl", "a", encoding="utf-8") as jsonl:
105
  rating_data = {"user": encrypted_user, "ratings": st.session_state.html_ratings, "timestamp": datetime.now().isoformat()}
106
  jsonl.write(json.dumps(rating_data, ensure_ascii=False))
 
98
  if user == "your.email@provider.com":
99
  st.sidebar.error(f"Please provide your email adress")
100
  else:
101
+ encrypted_user = encrypt_message(FERNET_KEY, user)
102
+ assert user == decrypt_message(FERNET_KEY, encrypted_user), "decoded is different from original"
 
103
  with open("rate_results.jsonl", "a", encoding="utf-8") as jsonl:
104
  rating_data = {"user": encrypted_user, "ratings": st.session_state.html_ratings, "timestamp": datetime.now().isoformat()}
105
  jsonl.write(json.dumps(rating_data, ensure_ascii=False))