Congratulations on successfully training and fine-tuning your model! Now it's time to actually use it.
To use the model in the sample web application, you first need to export the model.
- In the
Use
tab, select theExport
button - Select
TensorFlow.js
- Choose the /exports folder in the project as the destination folder
There are a few key elements in the main export directory. Your model in json format (model.json), its weights as binary shard files (.bin), and signature.json which contains information about your Lobe project.
This is what the folder structure of your exported model should look like:
exports/
<Project Name> TensorFlowJS/
example/
package.json
tfjsExample.ts
README.md
groupN-shardXofY.bin
labels.txt
model.json
signature.json
Copy the contents from your exported model folder into apps/web-bootstrap/public/model
folder in the sample web application.
Your team will have achieved this goal when the following success criteria are met:
- Your team has exported TensorFlow.js model
- The model files have been moved into the
public/model
directory of the sample web application
Your team might find these resources helpful:
- While you don't need the
example/
folder or thelabels.txt
file, moving these into the web application will not cause any problems.
After exporting the model and copying it into the web application, you can now move to the final step: run the web app and use your model!