Skip to content

Commit

Permalink
Add link of Installation Guides (#203)
Browse files Browse the repository at this point in the history
* Add link of Installation Guides

* For GPU

* For GPU
  • Loading branch information
ibelem authored Mar 25, 2024
1 parent 86eb311 commit 24b069b
Show file tree
Hide file tree
Showing 15 changed files with 42 additions and 18 deletions.
15 changes: 9 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,15 @@ To get started, follow these steps:
5. Keep in mind that WebNN currently supports the CPU backend only on Chrome or Edge browsers, and it requires enabling the experimental web platform features flag (see below). Ensure you have this flag enabled in your browser to fully experience WebNN functionality.
6. Experiment with the code and explore how WebNN can enhance machine learning tasks in the browser, navigating to http://localhost:8080.

### Enabling Experimental Features Flag
1. In Chrome navigate to `chrome://flags/`. In Edge navigate to `edge://flags/`.
1. Search for the **#enable-experimental-web-platform-features** flag.
1. Enable the feature: Toggle the corresponding switch or checkbox to turn it on.
**Note:** Enabling experimental features may lead to unexpected behavior, so proceed with caution.
1. Restart the browser: If prompted, restart your browser after enabling the feature.
### WebNN Installation Guides

WebNN requires a compatible browser to run, and Windows 11 v21H2 (DML 1.6.0) or higher for GPU. Try the latest Google Chrome* Canary or Microsoft Edge Canary, which requires enabling WebNN functionality in the settings.

1. Download the latest [Google Chrome Canary](https://www.google.com/chrome/canary/) or [Microsoft Edge Canary](https://www.microsoft.com/en-us/edge/download/insider) browser.
2. To enable WebNN, in your browser address bar, `enter chrome://flags`, and then press `Enter`. An Experiments page opens.
3. In the Search flags box, enter `webnn`. `Enables WebNN API` appears.
4. In the drop-down menu, select `Enabled`.
5. Relaunch your browser.

## Support and Feedback
If you encounter any issues or have feedback on the WebNN Samples, please open an issue on the repository. We appreciate your input and will strive to address any problems as quickly as possible.
Expand Down
2 changes: 1 addition & 1 deletion code/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<script>
// This workaround is to fix jquery loading issue in electron.
Expand Down
13 changes: 13 additions & 0 deletions common/component/component.js
Original file line number Diff line number Diff line change
Expand Up @@ -576,10 +576,23 @@ const webnnbadge = () => {
return nnbadge;
};

const footer = () => {
const footerlink = `
<p>
&copy;2024
<a href="https://webmachinelearning.github.io/">WebNN API</a> ·
<a href="https://github.com/webmachinelearning/webnn-samples#webnn-installation-guides">Installation Guides</a> ·
<a href="https://webmachinelearning.github.io/webnn-status/">Implementation Status</a>
</p>
`;
return footerlink;
}

$(document).ready(async () => {
$("nav ul.navbar-nav").html(webnnsamplenav());
$("#logosvg").html(webnnlogo());
$("#badge").html(webnnbadge());
$("#footer").html(footer());
if (await isWebNN()) {
if ($("#backendBtns")) {
if (!isElectron()) {
Expand Down
8 changes: 8 additions & 0 deletions common/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -815,4 +815,12 @@ a:hover {
.wider-col {
flex: 0 0 13%;
max-width: 13%;
}

#footer {
font-size: 0.8rem;
}

#footer a {
display: inline-block;
}
2 changes: 1 addition & 1 deletion face_recognition/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ <h2 class="text-uppercase text-info">No model selected</h2>
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<script>
// This workaround is to fix jquery loading issue in electron.
Expand Down
2 changes: 1 addition & 1 deletion facial_landmark_detection/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ <h2 class="text-uppercase text-info">No model selected</h2>
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<script>
// This workaround is to fix jquery loading issue in electron.
Expand Down
2 changes: 1 addition & 1 deletion image_classification/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ <h2 class="text-uppercase text-info">No model selected</h2>
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<script>
// This workaround is to fix jquery loading issue in electron.
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ <h1 class="title"><a class="replaceableUrl" href="./face_recognition/index.html"
</div>
</div>
<footer class="text-muted text-center text-small mt-5">
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<script>
// This workaround is to fix jquery loading issue in electron.
Expand Down
2 changes: 1 addition & 1 deletion lenet/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ <h5>Prediction Result:</h5>
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<script>
// This workaround is to fix jquery loading issue in electron.
Expand Down
2 changes: 1 addition & 1 deletion nsnet2/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<script>
// This workaround is to fix jquery loading issue in electron.
Expand Down
2 changes: 1 addition & 1 deletion object_detection/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ <h2 class="text-uppercase text-info">No model selected</h2>
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<script>
// This workaround is to fix jquery loading issue in electron.
Expand Down
2 changes: 1 addition & 1 deletion rnnoise/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<script>
// This workaround is to fix jquery loading issue in electron.
Expand Down
2 changes: 1 addition & 1 deletion selfie_segmentation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ <h2 class="text-uppercase text-info">No model selected</h2>
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<img id='feedElement' hidden crossorigin='anonymous' src=''>
<video id='feedMediaElement' autoplay playsinline hidden></video>
Expand Down
2 changes: 1 addition & 1 deletion semantic_segmentation/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ <h2 class="text-uppercase text-info">No model selected</h2>
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<img id='feedElement' hidden crossorigin='anonymous' src=''>
<video id='feedMediaElement' autoplay playsinline hidden></video>
Expand Down
2 changes: 1 addition & 1 deletion style_transfer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ <h6 class='text-muted shoulddisplay' style='display: none;'>
</div>
<footer class="text-muted text-center text-small mt-5">
<div id="badge"></div>
<p>&copy;2023 <a href="https://webmachinelearning.github.io/">WebNN API</a></p>
<div id="footer"></div>
</footer>
<script>
// This workaround is to fix jquery loading issue in electron.
Expand Down

0 comments on commit 24b069b

Please sign in to comment.