How do you edit object detection code for working with twilio?

how do you add code for twilio after running the model on raspberry pi. Can we edit the code as a python file?

Hi @finalyearproject,

This tutorial will help you get started integrating your model with a Python project on RPi.

Good luck!

You can also use this tutorial as something to start with. After deployment you can edit the ‘proj.dir’/build/webserver-twilio.js file on your Raspberry to add / change whatever you want. That works fine for me.

1 Like

i have seen this link but i am not sure how to add twilio details to my model. I am just getting used to this platform and providing me some steps to do this would be great

That is done as described in step 6 of the tutorial. Open a terminal window in your project directory and enter these commands:

6…Set your Twilio account token, secret key, the ‘from’ and ‘to’ numbers via:

$ export TWILIO_AUTH_TOKEN=3ce...
$ export TWILIO_ACCOUNT_SID=AC305...
$ export TWILIO_FROM=+162...
$ export TWILIO_TO=+31624...

You will have to do this after each time you reboot the Raspberry. If that is inconvenient you can add your Twilio credentials in the bashrc file as described in the tutorial:

Note:* You can add the lines above to your ~/.bashrc file so they’re loaded automatically.

this came when running step 8:

pi@raspberrypi:~/example-linux-with-twilio $ npm run build

edge-impulse-example-linux-with-twilio@1.0.0 build /home/pi/example-linux-with-twilio
tsc -p .

sh: 1: tsc: not found
npm ERR! syscall spawn
npm ERR! file sh
npm ERR! errno ENOENT
npm ERR! edge-impulse-example-linux-with-twilio@1.0.0 build: tsc -p .
npm ERR! spawn ENOENT
npm ERR!
npm ERR! Failed at the edge-impulse-example-linux-with-twilio@1.0.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in:
npm ERR! /home/pi/.npm/_logs/2021-06-01T11_07_24_955Z-debug.log

Try this:

From within your project dir:
$ npm update edge-impulse-linux

Then try step 8 again…

Issue has been duplicated here:

Run: npm install in your project directory before npm run build

1 Like