Spaces:
Build error
Build error
Update app.py
Browse files
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")
|