Skip to the content.

Running the TFJS Model, An example Twitter URL

Deploy Node.js app Open TF Hub Launch Example Binder Open In Colab

GitHub license GitHub stars GitHub forks GitHub watchers

The example can be launched by simply clicking on this button Launch Example. The code for the example can be found under the example folder in this repo. As of now this example is a very minimalistic one as you can see in the below image. The example website is deployed on the free tier of Azure App Services so inferences could take quite some time (90 seconds or so) when a lot of folks might be using it at the same time.

Getting Started

To get up and running with this example, run the following commands, make sure you have Node.js installed.

git clone git@github.com:Rishit-dagli/MIRNet-TFJS.git # or clone your own fork
cd MIRNet-TFJS
cd example # switch to the example folder
npm install
npm start

Your app should now be running on localhost:3000 :rocket:.

Run online on Repl.it

Alternatively you could also get up and running with this example with the free to use online service Repl.it. Get started by clicking on this button Run on Repl.it after which you would click the Run button on the top or run npm start and voila your app is now running :rocket:.

Troubleshooting

The example folder has a standalone modeltest.js file, which tries to run the model on a specified file and then save the output to test the model. You can test the model with this file through:

git clone git@github.com:Rishit-dagli/MIRNet-TFJS.git # or clone your own fork
cd MIRNet-TFJS
cd example # switch to the example folder
npm install
node modeltest.js

The modeltest.js uses the input.PNG image file in the root directory and outputs a output.Png image file.

Contributors

License

Copyright 2020 Rishit Dagli

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.