deepugaur commited on
Commit
cf54d78
·
verified ·
1 Parent(s): 23f87a3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -0
app.py CHANGED
@@ -61,3 +61,8 @@ import os
61
  if st.button("Train Model"):
62
  os.system("python train_model.py")
63
  st.success("Model training complete. Saved as deep_learning_model.h5")
 
 
 
 
 
 
61
  if st.button("Train Model"):
62
  os.system("python train_model.py")
63
  st.success("Model training complete. Saved as deep_learning_model.h5")
64
+
65
+ if not os.path.exists("deep_learning_model.h5"):
66
+ st.info("Training the model for the first time...")
67
+ os.system("python train_model.py")
68
+ st.success("Model trained successfully and saved as deep_learning_model.h5")