Spaces:
Running
Running
Commit
·
94e3b91
1
Parent(s):
fdb0c81
Update app.py
Browse files
app.py
CHANGED
@@ -120,7 +120,7 @@ try:
|
|
120 |
if user_choice == "Predict":
|
121 |
# Call the model with the training mode argument
|
122 |
# Use a dictionary to map the training mode to the corresponding boolean value
|
123 |
-
prediction = model.
|
124 |
st.success(f'Prediction: {labels[np.argmax(prediction[0], axis=-1)]}')
|
125 |
elif user_choice == "Train":
|
126 |
# Generate some dummy target data for demonstration
|
|
|
120 |
if user_choice == "Predict":
|
121 |
# Call the model with the training mode argument
|
122 |
# Use a dictionary to map the training mode to the corresponding boolean value
|
123 |
+
prediction = model.predict(image[np.newaxis, ...], training={"None": False, "Dropout": True, "Batch Normalization": True}[training_mode])
|
124 |
st.success(f'Prediction: {labels[np.argmax(prediction[0], axis=-1)]}')
|
125 |
elif user_choice == "Train":
|
126 |
# Generate some dummy target data for demonstration
|