Skip to content

Commit 654073d

Browse files
committed
Added readme
1 parent ca69e88 commit 654073d

File tree

6 files changed

+31
-1
lines changed

6 files changed

+31
-1
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ endif()
746746
if(EXECUTORCH_BUILD_WASM)
747747
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/extension/wasm)
748748
if(EXECUTORCH_BUILD_WASM_DEMO)
749-
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/examples/wasm)
749+
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/examples/wasm/demo)
750750
endif()
751751
endif()
752752

File renamed without changes.

examples/wasm/demo/README.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# ExecuTorch JavaScript Bindings Demo
2+
3+
This demo showcases the capabilities of ExecuTorch's JavaScript bindings. It is able to load a model, run inference, and classify an image natively in the browser.
4+
5+
## Prerequisites
6+
7+
- [Emscripten](https://emscripten.org/docs/getting_started/Tutorial.html)
8+
9+
## Building and Running
10+
11+
To build the demo, run the following command from the root of the repository:
12+
13+
```
14+
cd executorch # To the top level dir
15+
16+
# Build the demo
17+
bash scripts/build_wasm_demo.sh
18+
19+
# Run the demo
20+
python3 -m http.server --directory cmake-out-wasm/examples/wasm/demo/
21+
```
22+
23+
The page will be available at http://localhost:8000/demo.html.
24+
25+
## Demo Features
26+
27+
- Load a model from a file
28+
- It currently only supports the MobileNetv2 model. Passing in a model with different input/output shapes will result in an error.
29+
- You can generate the model file by following the instructions in the [Portable Mode Readme](../../portable/README.md).
30+
- Run inference on an image
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)