Commit
·
89a0138
1
Parent(s):
b06ee84
fixed conversion of enc key
Browse files- modeling.py +5 -1
modeling.py
CHANGED
@@ -25,7 +25,11 @@ def load_db():
|
|
25 |
with open(file_path, 'rb') as f:
|
26 |
encrypted_data = f.read()
|
27 |
|
28 |
-
|
|
|
|
|
|
|
|
|
29 |
decrypted_df = cipher.decrypt(encrypted_data)
|
30 |
st.session_state['db'] = pickle.loads(decrypted_df)
|
31 |
|
|
|
25 |
with open(file_path, 'rb') as f:
|
26 |
encrypted_data = f.read()
|
27 |
|
28 |
+
encryption_key = st.session_state['encryption_key']
|
29 |
+
if isinstance(encryption_key, str):
|
30 |
+
encryption_key = encryption_key.encode('utf-8')
|
31 |
+
|
32 |
+
cipher = Fernet(encryption_key)
|
33 |
decrypted_df = cipher.decrypt(encrypted_data)
|
34 |
st.session_state['db'] = pickle.loads(decrypted_df)
|
35 |
|