# Which framework makes it easy to run tensorflow.js code on backend then show result on website?

**URL:** <https://answers.netlify.com/t/which-framework-makes-it-easy-to-run-tensorflow-js-code-on-backend-then-show-result-on-website/5958>\
**Category:** Opentalk\
**Tags:** show-tell-share, lambda-functions, hugo, gatsby, deployment\
**Created:** [December 8, 2019, 1:00am UTC](https://answers.netlify.com/t/which-framework-makes-it-easy-to-run-tensorflow-js-code-on-backend-then-show-result-on-website/5958 "2019-12-08T01:00:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![regarder](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/regarder/32/4017_2.png) [@regarder](https://answers.netlify.com/u/regarder)\
**Post date:** [December 8, 2019, 1:00am UTC](https://answers.netlify.com/t/which-framework-makes-it-easy-to-run-tensorflow-js-code-on-backend-then-show-result-on-website/5958/1 "2019-12-08T01:00:26Z")

</div>

Looking to deploy a machine learning model preferably on a JAMstack framework such as Gatsby, Hugo etc. I was hoping someone had starter code that can make this process easier.

The goal is to have an end-user upload a document then the machine learning program displays some information to the end-user. After I’ll create an API to link the HTML page for another end-user.

So far the most I’ve done is update a sample Gatsby site and launch it via Netlify.

Thank you for your time.

---

<div class="post-metadata">

**Author:** ![luke](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/luke/32/39_2.png) [@luke](https://answers.netlify.com/u/luke)\
**Post date:** [December 9, 2019, 11:15am UTC](https://answers.netlify.com/t/which-framework-makes-it-easy-to-run-tensorflow-js-code-on-backend-then-show-result-on-website/5958/2 "2019-12-09T11:15:27Z")

</div>

Hi, @regarder, I don’t have code examples for doing something like this at Netlify. You would be the first person do to so (that I am aware of).

Are there any questions we can answer to assist you?

---

<div class="post-metadata">

**Author:** ![luke](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/luke/32/39_2.png) [@luke](https://answers.netlify.com/u/luke)\
**Post date:** [December 10, 2019, 8:03am UTC](https://answers.netlify.com/t/which-framework-makes-it-easy-to-run-tensorflow-js-code-on-backend-then-show-result-on-website/5958/4 "2019-12-10T08:03:36Z")

</div>

Thanks for the clarification, @regarder. First, it isn’t possible to run server side code at Netlify (the only exception being [Netlify Functions](https://docs.netlify.com/functions/overview/)).

However, Netlify Functions is limited to Node.js and Go at this time (so no Python).

You can still host a Python API with a different service (for example Heroku or AWS) and then use that API from the javascript on the site at Netlify.

Also, we have a in-depth topic about what is and isn’t possible at Netlify here:

> [@\[Support Guide\] Can I run a web server, HTTP listener, and/or database at Netlify?](https://answers.netlify.com/t/common-issue-can-i-run-a-web-server-http-listener-and-or-database-at-netlify/3078):
>
> Last reviewed: July 2025 How do I run a server/database at Netlify? We often get questions about how to run a specific backend server or database at Netlify. Examples of these types of questions include: How to I get my node HTTP listener to respond to requests? How do I start Mongo/MySQL/\<insert-some-database-here\> running on the server? How can I SSH into my website? We are here today to answer these questions - and the answer is: you can’t! hushed_faceWhat do you mean, I cannot run a …

There is also more documentation about getting Netlify CMS enabled for a site here:

[https://www.netlifycms.org/docs/intro/](https://www.netlifycms.org/docs/intro/)

Please let us know if there are other questions.

---

<div class="post-metadata">

**Author:** ![regarder](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/regarder/32/4017_2.png) [@regarder](https://answers.netlify.com/u/regarder)\
**Post date:** [December 11, 2019, 4:07am UTC](https://answers.netlify.com/t/which-framework-makes-it-easy-to-run-tensorflow-js-code-on-backend-then-show-result-on-website/5958/5 "2019-12-11T04:07:17Z")

</div>

Hi @luke

Thank you for your response!

So far I was thinking I could use an API that’ll send data from a file upload function on doorway.ai as code shown below (Is there modern JS that can do do a multi-document simultaneous upload?).

````auto
var txt = "";
if ('files' in x) {
  if (x.files.length == 0) {
    txt = "Select one or more files.";
  } else {
    for (var i = 0; i < x.files.length; i++) {
      txt += "<br><strong>" + (i+1) + ". file</strong><br>";
      var file = x.files[i];
      if ('name' in file) {
        txt += "name: " + file.name + "<br>";
      }
      if ('size' in file) {
        txt += "size: " + file.size + " bytes <br>";
      }
    }
  }
}
document.getElementById ("demo").innerHTML = txt; ```
  
Then the uploaded documents will be processed on another server via Python 
and the returned Python response will be sent back via Python Graphql API 
(Graphene "open to other packages") on the Gatsby website page.

 Am I missing any critical steps to uploading documents directly from end user
 on Gatsby interface and sending them to another server to be processed via
 Python and return results on Gatsby / Netlify interface?

Thank you for your time once again!
````

---

<div class="post-metadata">

**Author:** ![luke](https://sea1.discourse-cdn.com/netlify/user_avatar/answers.netlify.com/luke/32/39_2.png) [@luke](https://answers.netlify.com/u/luke)\
**Post date:** [December 16, 2019, 11:02am UTC](https://answers.netlify.com/t/which-framework-makes-it-easy-to-run-tensorflow-js-code-on-backend-then-show-result-on-website/5958/6 "2019-12-16T11:02:04Z")

</div>

Hi, @regarder, my ability to provide technical support is limited to Netlify’s hosting, services, and features.

Regarding which javascript library to use for a specific purpose, because that relates to the custom code of the site itself, it is outside our [scope of support](https://www.netlify.com/support-scope/).

Maybe someone else reading this topic will have done this before and have suggestions. Similarly, if you find a method/library which works well for you, we would love to hear about that solution here.
