ml5-library icon indicating copy to clipboard operation
ml5-library copied to clipboard

Renaming the label name on Teachable Machine does not reflect immediately to the application using ml5.js.

Open champierre opened this issue 3 years ago β€’ 1 comments

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

γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ_2023-01-28_12_19_09 γ‚Ήγ‚―γƒͺγƒΌγƒ³γ‚·γƒ§γƒƒγƒˆ_2023-01-28_12_19_55

β†’ 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

champierre avatar Jan 28 '23 03:01 champierre

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

sproutleaf avatar Jun 27 '23 15:06 sproutleaf