if(x == 1):
st.write("")
st.write("")
st.write(“Predict”)
if(st.button("Generate test images")): **After clicking this button the content disappears**
r = np.random.randint(0,len(x_test))
st.image(x_test[r].reshape(x_train.shape[1],x_train.shape[2]))
model = load_model("model/{}.h5".format(dataset))
result = classes[model.predict(x_test[r].reshape(-1,x_train.shape[1],x_train.shape[2],1)).argmax()]
st.write("Prediction : ",result)
PS : I read the forum, found SessionState can help but I’ve no clue how to use it