I got following error when I deployed app on streamlit

Hello, after deploying my CNN streaming app, I got stuck here because of the following error:
ValueError: Layer “conv2d_10” expected 2 variables but received 0 variables during loading. Names of variables received: []
I’ve been trying to figure out how to deploy this app for my college project from last four to five days, but I’ve been unsuccessful. Could you kindly assist me?

This project works well on my local machine without any errors, but when I deployed it on Streamline, I got this error like above.

I changed requirement.txt file by deleting tensorflow-intel==2.11.0 module of tensorflow because it was giving pip version not compatible error
Is the first error came because of this module deletion?

Hey @Vijay_Takbhate,

Please share a code sample with us so we can reproduce the error. Thanks!

1 Like

Here is model summary

Hey @Vijay_Takbhate,

Please check out our guide on how to post a question and edit your post to properly format your code. Thanks!

1 Like

Following is the code snippet which doing image processing
The error came when I deployed it on streamlit, this works fine in my local machine,
I can’t understand why it’s happening. Is this due to reshaping the image?

if canvas_result.image_data is not None:
image1 = canvas_result.image_data.astype(‘uint8’)
Image1 = cv2.cvtColor(image1,cv2.COLOR_BGR2GRAY)

if image1.max() > 200:
image1 = cv2.resize(image1,(28,28))
image1 = image_croper(image1,2)
image1 = cv2.resize(image1,(28,28))
image1 = np.reshape(image1,(1,28,28,1))/255
result = np.argmax(model.predict(image1))
st.write(f"Song Number {result} is playing…“)