cancel
Showing results for 
Search instead for 
Did you mean: 

Getting error in the google Colab

wbotros
Associate II

Hi, I am getting this error in the Colab note book. please see attached. 

Any idea what is wrong? 

Also, it seems this is the only Colab note book that could work. any place for a prject that will work with the pre-trained model? 

Thank you. 

 

 

2 REPLIES 2
Julian E.
ST Employee

Hello @wbotros ,

 

You get this error because model_list is empty.

If you look at the code:

 

models_list = [os.path.relpath(model, "../pretrained_models").split(os.sep)[2]+ ": " +  os.path.relpath(model, "..\\pretrained_models").split(os.sep)[-1] for model in glob.glob('../pretrained_models/**/*.tflite', recursive = True)]

 

It tries to get the list of model from the folder /pretrained_models that come from ST Model Zoo but that you don't have in your collab.

 

You need to clone the st model zoo repository locally and open this notebook locally.

Model zoo before you start: https://github.com/STMicroelectronics/stm32ai-modelzoo/tree/main?tab=readme-ov-file#before-you-start 

 

When running this notebook with vscode, I had issues with the widget (to select the board, model ect). I solved it by reinstalling a specific version of ipywidgets:  pip install -U ipywidgets==7.7.1

 

If you know how to both clone the git repository and open the notebook correctly in google collab, then you can do that. I would appreciate it if you could explain how you do it, if you succeed. 

 

Have a good day.

Julian


In order to give better visibility on the answered topics, please click on 'Accept as Solution' on the reply which solved your issue or answered your question.
Matthieu
ST Employee

Hello @wbotros ,

Actually, make sure to download a model from the model zoo in section: "Optional: download models from STM32 model zoo" or to upload your own model in the "models" folder in Colab.

Then make sure to select the model among the models stored in the "models" folder (section "Select a model from the models directory").

I just tried on Colab and it was working fine on my side.