louiecerv commited on
Commit
e18db79
·
1 Parent(s): 63f03a9
Files changed (1) hide show
  1. src/streamlit_app.py +10 -0
src/streamlit_app.py CHANGED
@@ -60,3 +60,13 @@ with open(model_filename, "wb") as rf_pickle:
60
  uniques_filename = os.path.join(output_dir, "uniques_data.pickle")
61
  with open(uniques_filename, "wb") as output_pickle:
62
  pickle.dump(uniques, output_pickle)
 
 
 
 
 
 
 
 
 
 
 
60
  uniques_filename = os.path.join(output_dir, "uniques_data.pickle")
61
  with open(uniques_filename, "wb") as output_pickle:
62
  pickle.dump(uniques, output_pickle)
63
+
64
+ # Load the files to enable download
65
+ with open(model_filename, "rb") as f:
66
+ model_bytes = f.read()
67
+ st.download_button(
68
+ label="Download Trained Model (random_forest_penguin.pickle)",
69
+ data=model_bytes,
70
+ file_name="random_forest_penguin.pickle",
71
+ mime="application/octet-stream"
72
+ )