프로젝트/Web Server 구축
[머신러닝 시각화_#2] Error code: 502-backend 장고+자바스크립트+파이선
david2012
2018. 1. 7. 21:36
장고,python을 pythonanywhere로 인터넷 배포하는 과정입니다.
http://http://david201207.pythonanywhere.com/
1.CAR : 정상작동
자바스크립트_CANVAS
2.그래프 : 정상작동
MATPLOT_MPLD3
3.쓰기/일기 : 정상작동
HTML/자바스크립트
4. 덧셈
1)개인pc local서버로 실행시(장고) 정상동작함
2) web으로 동작시 에러(502) ==> 에러 발생
[tensorflow code]
from django.shortcuts import render
from tensorapp.forms import *
from django.http import HttpResponse
def tensorapp(request):
import tensorflow as tf
sess = tf.Session()
a = tf.constant(2)
b = tf.constant(3)
c = a + b
html_fig=sess.run(c)
return render(request, "tesorprojd/gameexe.html", {'active_page' : 'gameexe.html', 'div_figure' : html_fig})
5. 단 덧셈을 cosoles 로 실행하면 결과값이 5로 정상 계산되어 나옴.다만, 상단에 경고메세지가 나오기는 하지만, 결과값은 정상으로 5가 출력됨