aboutsummaryrefslogtreecommitdiff
path: root/app/views.py
diff options
context:
space:
mode:
authorNavan Chauhan <navanchauhan@gmail.com>2020-08-01 15:34:22 +0530
committerNavan Chauhan <navanchauhan@gmail.com>2020-08-01 15:34:22 +0530
commite80badd278f54e8cde64243aa56687f8e6e32cc2 (patch)
tree12667ca96236edca69b9f28ae7a66a1884f30156 /app/views.py
parentcfa7ae936935010f77eaddd561ff1c0857a3c6f0 (diff)
added alpha model
Diffstat (limited to 'app/views.py')
-rw-r--r--app/views.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/app/views.py b/app/views.py
index 488053c..2532736 100644
--- a/app/views.py
+++ b/app/views.py
@@ -110,6 +110,7 @@ def wtform():
flash_errors(myform)
return render_template('wtform.html', form=myform)
+
try:
from lstm_chem.utils.config import process_config
from lstm_chem.model import LSTMChem
@@ -120,8 +121,7 @@ try:
print("Testing Model")
gen.sample(1)
except:
- print("ok")
-
+ print("Could not load tensorflow model :/")
@app.route('/Generate', methods=['GET','POST'])
def generate():
@@ -131,7 +131,8 @@ def generate():
with open("./app/prod/config.json") as config:
import json
j = json.loads(config.read())
- print(j["exp_name"])
+ print("Model Name:", j["exp_name"])
+
if request.method == 'POST' and form.validate_on_submit():
result = gen.sample(form.n.data)