Renaming the label name on Teachable Machine does not reflect immediately to the application using ml5.js.
Dear ml5 community,
I'm submitting a new issue. Please see the details below.
β Step 1: Describe the issue π
Did you find a bug? Want to suggest an idea for feature?
Renaming the label name on Teachable Machine does not reflect immediately to the application using ml5.js. The label name is stored in metadata.json which is located at https://storage.googleapis.com/, and it is cached for 3600 seconds(1 hour). To invalidate the cache, you need to add a timestamp parameter(see the screenshots), but I found that ml5.js generates metadata URL from the model URL without passing an extra parameter.
The code is here: https://github.com/ml5js/ml5-library/blob/c3123cac0b1dfa0ed8e3e2588e8dea72ccd05aa8/src/ImageClassifier/index.js#L105
Can I create a PR that passes the extra parameter, if the model URL has one?
β Step 2: Screenshots or Relevant Documentation πΌ
Here's some helpful screenshots and/or documentation of the new feature
β Step 3: Share an example of the issue π¦
Here's some example code or a demonstration of my feature in this issue, separate GitHub repo, or in the https://editor.p5js.org or codepen/jsfiddle/Glitch/etc...
Other relevant information, if applicable
β Describe your setup π¦
Here's some helpful information about my setup...
- Web browser & version:
- Operating System:
- ml5 version you're using:
- Any additional notes
Chrome 109.0.5414.119 ml5.js 0.4.3
Hi Junya,
Thank you so much for opening this issue with us, and we apologize for taking a long time to get back to you. Please feel free to create a PR if you're still interested in adding the timestamp parameter. PRs are always welcome!
Miaoye