Skip to content
This repository has been archived by the owner on Apr 6, 2020. It is now read-only.

Makes Examples Mobile-friendly #217

Open
wants to merge 3 commits into
base: release
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 4 additions & 6 deletions javascript/BodyPix/BodyPix_Image/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,16 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>BodyPix with Webcam</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
<script src="sketch.js"></script>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Correct me if I'm mistaken, but we should always try to leave the sketch.js at the end of the body tag to make sure that the DOM elements are loaded before calling the script.

This example will work fine this way, but for consistency, we should just always call script.js at the end of the index.html.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the reply!
That sounds about right, I'll have time to hack on it later today 🀘

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a bunch! Let me know whenever you're ready and I can review. If you're able to resolve any of the merge conflicts that would be great, otherwise I can also take care :)

Many thanks!

</head>

<script src="sketch.js"></script>

<body>
<h1>BodyPix with Image</h1>
<small>images via: https://commons.wikimedia.org</small>

<h1>BodyPix with Image</h1>
<small>images via: https://commons.wikimedia.org</small>
</body>

</html>
5 changes: 2 additions & 3 deletions javascript/BodyPix/BodyPix_Webcam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>BodyPix with Webcam</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
<script src="sketch.js"></script>
</head>

<script src="sketch.js"></script>

<body>
<h1>BodyPix with Webcam</h1>
Expand Down
5 changes: 2 additions & 3 deletions javascript/BodyPix/BodyPix_Webcam_Parts/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>BodyPix with Webcam</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
<script src="sketch.js"></script>
</head>

<script src="sketch.js"></script>

<body>
<h1>BodyPix with Webcam and Part Segmentation</h1>
Expand Down
2 changes: 1 addition & 1 deletion javascript/CVAE/CVAE_QuickDraw/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<html>
<head>
<meta charset="UTF-8" >
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
<meta name="viewport" content="width=device-width, initial-scale=1" >

Expand Down
4 changes: 2 additions & 2 deletions javascript/CharRNN/CharRNN_Interactive/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
<meta name="viewport" content="width=device-width, initial-scale=1" >
<title>Interactive CharRNN Text Generation Example</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
</head>
<body>
<h1>Interactive CharRNN Text Generation Example</h1>
Expand Down
1 change: 1 addition & 0 deletions javascript/CharRNN/CharRNN_Text/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>LSTM Text Generation Example</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

Expand Down
3 changes: 1 addition & 2 deletions javascript/CharRNN/CharRNN_Text_Stateful/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Stateful CharRNN Text Generation Example</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>


<style></style>

</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions javascript/DCGAN/DCGAN_Random/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

Expand Down
5 changes: 2 additions & 3 deletions javascript/FaceApi/FaceApi_Image_Landmarks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>FaceApi Landmarks Demo</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
<script src="sketch.js"></script>
</head>

<script src="sketch.js"></script>

<body>
<h1>FaceApi Landmarks Demo</h1>
Expand Down
5 changes: 2 additions & 3 deletions javascript/FaceApi/FaceApi_Video_Landmarks/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>FaceApi Landmarks Demo</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
<script src="sketch.js"></script>
</head>

<script src="sketch.js"></script>

<body>
<h1>FaceApi Landmarks Demo</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>FaceApi Landmarks Demo With Local Models</title>

<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
<script src="sketch.js"></script>
</head>

<script src="sketch.js"></script>

<body>
<h1>FaceApi Landmarks Demo With Locally Served Models</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Image Classification using Feature Extraction with MobileNet</title>


<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
</head>

<body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,11 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Image Regression using Feature Extraction with MobileNet.</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>


<style></style>
</head>
</head>

<body>
<h1>Image Regression using Feature Extraction with MobileNet.</h1>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Image Classification Example</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>
</head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Canvas Image Classification using DoodleNet</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>
<style></style>
</head>

<body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Webcam Image Classification using DoodleNet</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>
</head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Multiple Image classification using MobileNet</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>
</head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Webcam Image Classification using MobileNet</title>


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Webcam Image Classification with Speech Output using MobileNet</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Webcam Image Classification with Speech Output using MobileNet</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Webcam Image Classification using a pre-trianed customized model</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>
</head>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>PoseNet with KNN Classification on Webcam Images</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
</head>

<body>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>KNN Classification on Webcam Images with mobileNet.</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
</head>
</head>

<body>
<h2>KNN Classification on Webcam Images with mobileNet. Built with p5.js</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,12 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>KNN Classification on Webcam Images with Speech Output Using mobileNet.</title>


<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
</head>
</head>

<body>
<h2>KNN Classification on Webcam Images with Speech Output Using mobileNet.</h2>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>KNN Classification on Webcam Images with mobileNet</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
</head>
</head>

<body>
<h2>KNN Classification on Webcam Images that moves a square on the canvas with mobileNet</h2>
Expand Down
1 change: 1 addition & 0 deletions javascript/PitchDetection/PitchDetection/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">

<title>Pitch Detection</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>
Expand Down
1 change: 1 addition & 0 deletions javascript/PitchDetection/PitchDetection_Game/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Pitch Tone Game</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

Expand Down
1 change: 1 addition & 0 deletions javascript/PitchDetection/PitchDetection_Piano/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">

<title>Pitch Detect Piano</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>
Expand Down
3 changes: 1 addition & 2 deletions javascript/Pix2Pix/Pix2Pix_callback/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Pix2Pix Edges2Pikachu Example</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
</head>

<body>
Expand Down
3 changes: 1 addition & 2 deletions javascript/Pix2Pix/Pix2Pix_promise/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>Pix2Pix Edges2Pikachu Example</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

<style></style>
</head>

<body>
Expand Down
1 change: 1 addition & 0 deletions javascript/PoseNet/PoseNet_image_single/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>PoseNet example on image with single detection</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>

Expand Down
1 change: 1 addition & 0 deletions javascript/PoseNet/PoseNet_part_selection/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>PoseNet Part Selection</title>

<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>
Expand Down
1 change: 1 addition & 0 deletions javascript/PoseNet/PoseNet_webcam/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width">
<title>PoseNet Example</title>

<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>
Expand Down
2 changes: 0 additions & 2 deletions javascript/Sentiment/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/p5.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.8.0/addons/p5.dom.min.js"></script>

<style></style>

</head>

<body>
Expand Down
4 changes: 3 additions & 1 deletion javascript/SketchRNN/SketchRNN_basic/index.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
<html>
<head>
<meta charset="UTF-8" >
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" >
<meta name="viewport" content="width=device-width, initial-scale=1" >
<title>SketchRNN</title>
<script src="https://unpkg.com/[email protected]/dist/ml5.min.js" type="text/javascript"></script>
</head>
Expand Down
Loading