Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
champierre opened this issue Jan 28, 2023 · 1 comment

Comments

@champierre
Copy link
Contributor

champierre commented Jan 28, 2023

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:

const metadataUrl = `${prefix}/metadata.json`;

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

@sproutleaf
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants