Skip to content

Commit bdc0a94

Browse files
author
joeyklee
committed
Merge branch 'main' into joeyklee.637-refactor-tests-to-jest
2 parents 535c5b1 + a409ffe commit bdc0a94

File tree

7 files changed

+70
-7
lines changed

7 files changed

+70
-7
lines changed

.all-contributorsrc

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1249,6 +1249,44 @@
12491249
"bug",
12501250
"code"
12511251
]
1252+
},
1253+
{
1254+
"login": "eltociear",
1255+
"name": "Ikko Ashimine",
1256+
"avatar_url": "https://avatars.githubusercontent.com/u/22633385?v=4",
1257+
"profile": "https://bandism.net/",
1258+
"contributions": [
1259+
"doc"
1260+
]
1261+
},
1262+
{
1263+
"login": "Mudasar-Makandar",
1264+
"name": "Mudasar-Makandar",
1265+
"avatar_url": "https://avatars.githubusercontent.com/u/46401916?v=4",
1266+
"profile": "https://github.com/Mudasar-Makandar",
1267+
"contributions": [
1268+
"bug",
1269+
"code"
1270+
]
1271+
},
1272+
{
1273+
"login": "amirfeqhi",
1274+
"name": "Amir Feqhi",
1275+
"avatar_url": "https://avatars.githubusercontent.com/u/26363996?v=4",
1276+
"profile": "https://github.com/amirfeqhi",
1277+
"contributions": [
1278+
"code"
1279+
]
1280+
},
1281+
{
1282+
"login": "danidask",
1283+
"name": "DasK",
1284+
"avatar_url": "https://avatars.githubusercontent.com/u/9405129?v=4",
1285+
"profile": "https://github.com/danidask",
1286+
"contributions": [
1287+
"code",
1288+
"ideas"
1289+
]
12521290
}
12531291
],
12541292
"contributorsPerLine": 7,

README.md

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,17 +57,20 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github.
5757

5858

5959

60+
61+
62+
6063

6164

6265

6366

6467
<p id="latest-version">
6568

66-
* You can use the latest version (0.9.8) by adding it to the head section of your HTML document:
69+
* You can use the latest version (0.10.1) by adding it to the head section of your HTML document:
6770

68-
**v0.9.8**
71+
**v0.10.1**
6972

70-
<script src="https://unpkg.com/ml5@0.9.8/dist/ml5.min.js" type="text/javascript"></script>
73+
<script src="https://unpkg.com/ml5@0.10.1/dist/ml5.min.js" type="text/javascript"></script>
7174

7275
</p data-id="latest-version">
7376

@@ -98,6 +101,9 @@ Before getting started with ml5.js, review our [Code of Conduct](https://github.
98101

99102

100103

104+
105+
106+
101107

102108

103109

@@ -321,6 +327,10 @@ Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/d
321327
<td align="center"><a href="http://p5js.org"><img src="https://avatars.githubusercontent.com/u/191056?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lauren Lee McCarthy</b></sub></a><br /><a href="https://github.com/ml5js/ml5-library/commits?author=lmccart" title="Code">💻</a> <a href="https://github.com/ml5js/ml5-library/commits?author=lmccart" title="Documentation">📖</a></td>
322328
<td align="center"><a href="https://www.suse.com/"><img src="https://avatars.githubusercontent.com/u/940170?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sorin Curescu</b></sub></a><br /><a href="https://github.com/ml5js/ml5-library/commits?author=en3sis" title="Code">💻</a></td>
323329
<td align="center"><a href="https://github.com/mofanke"><img src="https://avatars.githubusercontent.com/u/54242816?v=4?s=100" width="100px;" alt=""/><br /><sub><b>mofanke</b></sub></a><br /><a href="https://github.com/ml5js/ml5-library/issues?q=author%3Amofanke" title="Bug reports">🐛</a> <a href="https://github.com/ml5js/ml5-library/commits?author=mofanke" title="Code">💻</a></td>
330+
<td align="center"><a href="https://bandism.net/"><img src="https://avatars.githubusercontent.com/u/22633385?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ikko Ashimine</b></sub></a><br /><a href="https://github.com/ml5js/ml5-library/commits?author=eltociear" title="Documentation">📖</a></td>
331+
<td align="center"><a href="https://github.com/Mudasar-Makandar"><img src="https://avatars.githubusercontent.com/u/46401916?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Mudasar-Makandar</b></sub></a><br /><a href="https://github.com/ml5js/ml5-library/issues?q=author%3AMudasar-Makandar" title="Bug reports">🐛</a> <a href="https://github.com/ml5js/ml5-library/commits?author=Mudasar-Makandar" title="Code">💻</a></td>
332+
<td align="center"><a href="https://github.com/amirfeqhi"><img src="https://avatars.githubusercontent.com/u/26363996?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Amir Feqhi</b></sub></a><br /><a href="https://github.com/ml5js/ml5-library/commits?author=amirfeqhi" title="Code">💻</a></td>
333+
<td align="center"><a href="https://github.com/danidask"><img src="https://avatars.githubusercontent.com/u/9405129?v=4?s=100" width="100px;" alt=""/><br /><sub><b>DasK</b></sub></a><br /><a href="https://github.com/ml5js/ml5-library/commits?author=danidask" title="Code">💻</a> <a href="#ideas-danidask" title="Ideas, Planning, & Feedback">🤔</a></td>
324334
</tr>
325335
</table>
326336

docs/reference/charrnn.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,11 @@ charrnn.reset();
159159
160160
**p5 web editor**
161161
162-
* [CharRNN_Interactive](https://editor.p5js.org/ml5/sketches/CharRNN_Interactive)
162+
Please be advised, that due to an incompatibility of the p5 web-editor and the weights that are used in this example, this example does not work in the p5 we-editor.
163+
Please use the p5.js example locally. Learn more about how to run examples locally [here.](https://github.com/ml5js/ml5-library/blob/main/examples/README.md#setup)
164+
<!-- * [CharRNN_Interactive](https://editor.p5js.org/ml5/sketches/CharRNN_Interactive)
163165
* [CharRNN_Text](https://editor.p5js.org/ml5/sketches/CharRNN_Text)
164-
* [CharRNN_Text_Stateful](https://editor.p5js.org/ml5/sketches/CharRNN_Text_Stateful)
166+
* [CharRNN_Text_Stateful](https://editor.p5js.org/ml5/sketches/CharRNN_Text_Stateful) -->
165167
166168
**plain javascript**
167169
* [CharRNN_Interactive](https://github.com/ml5js/ml5-library/tree/main/examples/javascript/CharRNN/CharRNN_Interactive)

examples/CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Please refer to [#1](https://github.com/ml5js/ml5-examples/issues/1) (thanks [@d
2424

2525
## Organizing Examples of different features
2626

27-
If you're interested to make example, you can organize them as heirarchy like so:
27+
If you're interested to make example, you can organize them as hierarchy like so:
2828

2929
```
3030
/FeatureName

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ml5",
3-
"version": "0.9.8",
3+
"version": "0.10.1",
44
"description": "A friendly machine learning library for the web.",
55
"main": "dist/ml5.min.js",
66
"directories": {

src/ImageClassifier/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,10 @@ class ImageClassifier {
6565
this.modelToUse = null;
6666
}
6767
} else {
68+
// its a url, we expect to find model.json
6869
this.modelUrl = modelNameOrUrl;
70+
// The teachablemachine urls end with a slash, so add model.json to complete the full path
71+
if (this.modelUrl.endsWith('/')) this.modelUrl += "model.json";
6972
}
7073
}
7174
// Load the model

src/NeuralNetwork/NeuralNetworkData.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -955,6 +955,16 @@ class NeuralNetworkData {
955955

956956
return parentCopy;
957957
}
958+
959+
/**
960+
* getData
961+
* return data object's raw array
962+
* to make getting raw data easier
963+
*/
964+
getData() {
965+
const rawArray = this.data.raw;
966+
return rawArray;
967+
}
958968
}
959969

960970
export default NeuralNetworkData;

0 commit comments

Comments
 (0)