How to use Tensorflow in django webapp or in django REST framwork

3,136 views
Skip to first unread message

danis...@gmail.com

unread,
Nov 8, 2016, 2:19:28 PM11/8/16
to Discuss
hey, guys can you please tell me that how can I use tensorflow in Django web app 

tobe

unread,
Nov 8, 2016, 6:46:02 PM11/8/16
to danis...@gmail.com, Discuss
I'm not sure if you want to use Django http service for training or inferencing. Both of them are possible.

We have written the TensorFlow application in Python and export the checkpoint locally. Then start the Django web server to restore the checkpoint and do continuously training or inferencing. You can checkout the example code in https://github.com/tobegit3hub/deep_recommend_system/tree/master/http_service .





Regards


On Wed, Nov 9, 2016 at 3:19 AM, <danis...@gmail.com> wrote:
hey, guys can you please tell me that how can I use tensorflow in Django web app 

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/31b34d76-3616-4b90-b29d-c2e0fcdb1980%40tensorflow.org.

Screen Shot 2016-11-09 at 07.41.28.png
Screen Shot 2016-11-09 at 07.41.28.png

Vikesh Khanna

unread,
Nov 8, 2016, 8:14:45 PM11/8/16
to tobe, danis...@gmail.com, Discuss
Hi Kashif,

It depends on what you mean by "use tensorflow". If you want:
  • Inference: I strongly recommend using Tensorflow Serving. It allows you to expose your models as an RPC service that is agnostic of the client (Django application, Flask application, python script etc.)
  • Training: I'd say it is uncommon to directly interact with TF models through a web app for training. The typical stack might include an API for collecting raw data that is piped into a large-scale data store from where your training infra picks it up. A simple and small-scale instantiation of this would be to collect data from the API into a few files on the server and run your training script locally on the server offline. The training script exports (see Tensorflow Serving) the latest version of the model using the latest checkpoints to the inference server from which the TF Serving server picks it up (built-in feature: it polls the filesystem for a more recent version of the model). This will sound less overwhelming when you read about TF Serving.

Thanks,   




--
Vikesh Khanna,
Masters, Computer Science
Stanford University

kashif Nawaz

unread,
Nov 11, 2016, 7:01:32 AM11/11/16
to Discuss
First of all thank you so much for your help, and Actually, I want to use it for training in simple word I want to collect data from website of user and then process it and then give then suggestion just like facebook or twitter are doing is it ok to use tensorflow or is it possible?  


On Wednesday, November 9, 2016 at 6:44:45 AM UTC+5:30, Vikesh Khanna wrote:
Hi Kashif,

It depends on what you mean by "use tensorflow". If you want:
  • Inference: I strongly recommend using Tensorflow Serving. It allows you to expose your models as an RPC service that is agnostic of the client (Django application, Flask application, python script etc.)
  • Training: I'd say it is uncommon to directly interact with TF models through a web app for training. The typical stack might include an API for collecting raw data that is piped into a large-scale data store from where your training infra picks it up. A simple and small-scale instantiation of this would be to collect data from the API into a few files on the server and run your training script locally on the server offline. The training script exports (see Tensorflow Serving) the latest version of the model using the latest checkpoints to the inference server from which the TF Serving server picks it up (built-in feature: it polls the filesystem for a more recent version of the model). This will sound less overwhelming when you read about TF Serving.

Thanks,   
On Tue, Nov 8, 2016 at 3:45 PM, tobe <tobeg...@gmail.com> wrote:
I'm not sure if you want to use Django http service for training or inferencing. Both of them are possible.

We have written the TensorFlow application in Python and export the checkpoint locally. Then start the Django web server to restore the checkpoint and do continuously training or inferencing. You can checkout the example code in https://github.com/tobegit3hub/deep_recommend_system/tree/master/http_service .





Regards

On Wed, Nov 9, 2016 at 3:19 AM, <danis...@gmail.com> wrote:
hey, guys can you please tell me that how can I use tensorflow in Django web app 

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.

--
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.

To post to this group, send email to dis...@tensorflow.org.
Reply all
Reply to author
Forward
0 new messages