Point CharRNN examples to model files hosted in ml5-data-and-models repo #1186
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1123. Fixes #866.
Community members flagged issues loading models backing the CharRNN examples on the p5.js Web Editor. This issue was occurring because the models, which are JSON files, we're correctly being loaded as assets by p5.js Web Editor. Instead of storing the models in the example, I realized we could also just use the hosted version of this in ml5-data-and-models.
There's a risk in using models in the ml5-data-and-models repo because, should anyone change the directory structure in that repo, our examples would silently break. The benefit, though, is that we don't have to store duplicates of the same sizable model files in every CharRNN example. Longterm, we should probably move these assets to be hosted on a more popular CDN (e.g. AWS S3), but in the meantime, I think this is a good interim solution that fixes the issue.
Verified changes by running the examples locally using
npm run develop
. I also tested my edit to use the hosted woolf model in p5.js web editor to confirm that it loads and correct the issue highlighted in #1123.