Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,7 +39,7 @@ if not os.path.exists("cifar10_cnn_model.h5"):
|
|
| 39 |
|
| 40 |
# Train the model
|
| 41 |
st.write("Training the model...")
|
| 42 |
-
history = model.fit(x_train, y_train, epochs=
|
| 43 |
|
| 44 |
# Save the model
|
| 45 |
model.save("cifar10_cnn_model.h5")
|
|
@@ -53,7 +53,7 @@ else:
|
|
| 53 |
class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
|
| 54 |
|
| 55 |
# Streamlit app title
|
| 56 |
-
st.title("
|
| 57 |
|
| 58 |
# Upload image
|
| 59 |
uploaded_file = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])
|
|
|
|
| 39 |
|
| 40 |
# Train the model
|
| 41 |
st.write("Training the model...")
|
| 42 |
+
history = model.fit(x_train, y_train, epochs=100, validation_data=(x_val, y_val)) # Reduced epochs for quick testing
|
| 43 |
|
| 44 |
# Save the model
|
| 45 |
model.save("cifar10_cnn_model.h5")
|
|
|
|
| 53 |
class_names = ['airplane', 'automobile', 'bird', 'cat', 'deer', 'dog', 'frog', 'horse', 'ship', 'truck']
|
| 54 |
|
| 55 |
# Streamlit app title
|
| 56 |
+
st.title("Image Detection System")
|
| 57 |
|
| 58 |
# Upload image
|
| 59 |
uploaded_file = st.file_uploader("Upload an image", type=["jpg", "jpeg", "png"])
|