Skip to content

Commit 780d641

Browse files
committed
Remove most ml5-examples references
1 parent d99f97a commit 780d641

File tree

6 files changed

+17
-60
lines changed

6 files changed

+17
-60
lines changed

docs/styleguide/development-guidelines.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Here are some principles that we try to uphold while developing `ml5-library`:
1616

1717
## Principles for ml5.js examples
1818

19-
In addition to the principles above, we try our best to write our `ml5-examples`:
19+
In addition to the principles above, we try our best to write our examples:
2020

2121
| Guideline | description |
2222
| ------------- | ------------ |

docs/tutorials/hello-ml5.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ Your project directory should look something like this:
4444

4545
## Demo
4646

47-
This example is built with p5.js. You can also find the same example without p5.js [here](https://github.com/ml5js/ml5-examples/tree/release/javascript/ImageClassification).
47+
This example is built with p5.js. You can also find the same example without p5.js [here](https://github.com/ml5js/ml5-library/tree/development/examples/javascript/ImageClassification/ImageClassification).
4848

4949
<br/>
5050

@@ -55,7 +55,7 @@ This example is built with p5.js. You can also find the same example without p5.
5555
</div> -->
5656

5757
<!-- added inline height -->
58-
<div style="height:800px" class="iframe__container iframe__container--video"><iframe src="https://ml5js.github.io/ml5-examples/p5js/ImageClassification/ImageClassification" frameborder="0" height="800px" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
58+
<div style="height:800px" class="iframe__container iframe__container--video"><iframe src="https://examples.ml5js.org/p5js/imageclassification/imageclassification" frameborder="0" height="800px" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe></div>
5959

6060
## Code
6161

@@ -201,7 +201,7 @@ Some guiding questions you might start to think about are:
201201
1. When classifying an image with MobileNet, does the computer see people? If not, why do you think that is?
202202
2. Do you notice that MobileNet is better at classifying some animals over others? Why do you think that is?
203203

204-
## [Source](https://github.com/ml5js/ml5-examples/tree/master/p5js/ImageClassification/ImageClassification)
204+
## [Source](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/ImageClassification/ImageClassification)
205205

206-
- [ml5.js image classification on Github](https://github.com/ml5js/ml5-examples/tree/master/p5js/ImageClassification/ImageClassification)
206+
- [ml5.js image classification on Github](https://github.com/ml5js/ml5-library/tree/development/examples/p5js/ImageClassification/ImageClassification)
207207
- [ml5.js image classification on p5 web editor](https://editor.p5js.org/ml5/sketches/ImageClassification)

docs/tutorials/local-web-server.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -4,38 +4,12 @@ If you've looked at our [quickstart](/getting-started/) and [introduction to ml5
44

55
<br/>
66

7-
A big part of the ml5 project is to create lots of examples as launching points for all your creative project ideas. You can find all of the ml5.js examples at out Github page: [ml5-examples](https://github.com/ml5js/ml5-examples). If you start to explore these examples you can see how the different ml5 functions are used to accomplish different outcomes. We try our best to keep the examples as simple as possible so you can easily start to build your ideas on top of them.
7+
A big part of the ml5 project is to create lots of examples as launching points for all your creative project ideas. You can find all of the ml5.js examples at our Github page: [ml5-library](https://github.com/ml5js/ml5-library/tree/development/examples). If you start to explore these examples you can see how the different ml5 functions are used to accomplish different outcomes. We try our best to keep the examples as simple as possible so you can easily start to build your ideas on top of them.
88

99
You can check out all the examples running:
10-
> - [on this massive list](https://github.com/ml5js/ml5-examples#examples-index)
10+
> - [on this massive list](https://examples.ml5js.org/)
1111
> - [on the p5 web editor](https://editor.p5js.org/ml5/sketches)
1212
13-
If you'd like to download the examples and run them locally, download the [ml5-examples github repo](https://github.com/ml5js/ml5-examples) and run a local web server at the root directory (if this sentence sounds foreign to you, see the How-To section below). The fastest way to do this is:
13+
If you'd like to download the examples and run them locally, download the [ml5-library github repo](https://github.com/ml5js/ml5-library) and follow the instructions [here](https://github.com/ml5js/ml5-library/blob/development/examples/README.md#setup).
1414

15-
<br/>
16-
17-
with **python3** installed on your computer:
18-
```bash
19-
cd /path/to/ml5-examples
20-
python -m http.server 8081
21-
```
22-
23-
<br/>
24-
25-
with **python2.7** installed on your computer:
26-
27-
```bash
28-
cd /path/to/ml5-examples
29-
python -m SimpleHTTPServer 8081
30-
```
31-
32-
Then open up your web browser to the url: **localhost:8081**
33-
34-
<br/>
35-
36-
Here we set the port number to **8081**, but you can change the port number to something else like **3000** (then: **localhost:3030**), **3001** (then: **localhost:3031**) for example.
37-
38-
39-
## How to: Run examples and develop "locally"
40-
41-
Coming soon! In the meantime, you can watch [CodingTrain - getting set up](https://www.youtube.com/watch?v=UCHzlUiDD10) for a nice intro on getting set up with writing code for the web.
15+
You may also be interested in watching [CodingTrain - getting set up](https://www.youtube.com/watch?v=UCHzlUiDD10) for a nice intro on getting set up with writing code for the web.

examples/README.md

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33
## Description
44

5-
This repository contains a collection of examples using [ml5.js](https://github.com/ml5js/ml5-library). The examples are meant to serve as an introduction to the library and machine learning concepts.
5+
The examples are meant to serve as an introduction to the library and machine learning concepts.
66

77
Examples are organized into folders according to their integration with other JavaScript libraries.
88

9-
For example, the `/p5js` folder holds examples of using [ml5.js](https://github.com/ml5js/ml5-library) with [p5.js](https://p5js.org/). All examples are self-contained and can be run independently. Libraries are loaded through a Content Delivery Network (CDN) and certain examples (indicated in code comments) download a machine learning model from a "cloud" url. This means that ml5 currently relies on an internet connection in order to retrieve pre-trained models (unless they are served locally).
9+
For example, the `examples/p5js` folder holds examples of using [ml5.js](https://github.com/ml5js/ml5-library) with [p5.js](https://p5js.org/). All examples are self-contained and can be run independently. Libraries are loaded through a Content Delivery Network (CDN) and certain examples (indicated in code comments) download a machine learning model from a "cloud" url. This means that ml5 currently relies on an internet connection in order to retrieve pre-trained models (unless they are served locally).
1010

1111
Instead of using the CDN links to p5 and ml5, you can [download the p5.js libraries here](https://github.com/processing/p5.js/releases) and [ml5 library here](https://github.com/ml5js/ml5-library/releases).
1212

@@ -18,15 +18,15 @@ Open your terminal and type:
1818

1919
```sh
2020
# clone the repo or download the zip file
21-
git clone https://github.com/ml5js/ml5-examples.git
21+
git clone https://github.com/ml5js/ml5-library.git
2222
```
2323

2424
### Step 2: start a local development server
2525
Open your terminal
2626

2727
```sh
2828
# change directories
29-
cd ml5-examples
29+
cd ml5-library
3030

3131
# install the dependencies
3232
npm install
@@ -35,35 +35,18 @@ npm install
3535
npm run develop
3636

3737
# you should be able to run the examples at:
38-
# localhost:8082
38+
# localhost:8081
3939

4040
```
4141

4242
If you don't know how to start a server, check [this guide on how to start a local web server](https://learn.ml5js.org/docs/#/tutorials/local-web-server?id=running-a-local-web-server).
4343

4444

45-
## Usage
46-
47-
Open your terminal
48-
49-
```sh
50-
# change directories
51-
cd ml5-examples
52-
53-
# run the local web server
54-
npm run develop
55-
56-
# you should be able to run the examples at:
57-
# localhost:8082
58-
59-
```
60-
61-
6245
## Examples Index
6346

6447
* [ml5 examples in the p5 web editor](https://editor.p5js.org/ml5/sketches)
6548
* The best way to interact with our examples are using the [p5 web editor](https://editor.p5js.org/ml5/sketches). This is an interactive coding environment.
66-
* Run the examples using the [example index](https://ml5js.github.io/ml5-examples/public)
49+
* Run the examples using the [example index](https://examples.ml5js.org/)
6750
* We have examples written in plain javascript, p5.js, and more.
6851

6952

src/FaceApi/index_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe('faceApi', () => {
2525
async function getImage() {
2626
const img = new Image();
2727
img.crossOrigin = true;
28-
img.src = 'https://raw.githubusercontent.com/ml5js/ml5-examples/development/p5js/FaceApi/FaceApi_Image_Landmarks/assets/frida.jpg';
28+
img.src = 'https://raw.githubusercontent.com/ml5js/ml5-library/development/examples/javascript/FaceApi/FaceApi_Image_Landmarks/assets/frida.jpg';
2929
await new Promise((resolve) => {
3030
img.onload = resolve;
3131
});

src/KMeans/index_test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ const KMEANS_DEFAULTS = {
1515

1616
describe('kMeans', () => {
1717
let kmeansModel;
18-
const dataurl = 'https://raw.githubusercontent.com/ml5js/ml5-examples/development/d3/KMeans/KMeans_GaussianClusterDemo/data/gaussian2d_2clusters.csv'
18+
const dataurl = 'https://raw.githubusercontent.com/ml5js/ml5-library/development/examples/d3/KMeans/KMeans_GaussianClusterDemo/data/gaussian2d_2clusters.csv'
1919

2020
beforeAll(async () => {
2121
jasmine.DEFAULT_TIMEOUT_INTERVAL = 10000;

0 commit comments

Comments
 (0)