summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2017-11-06 15:13:51 +0000
committergebele <gebele@in-silico.ch>2017-11-06 15:13:51 +0000
commit668e485e63715d0dfa4e6e2f70323fd1ecb95ee6 (patch)
treee0b6c81345235a99fedb8c4e7721f958ebb63e61
parent66334c4479e993fdf75535629700c84edbc7ba6c (diff)
various small fixes
-rw-r--r--application.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/application.rb b/application.rb
index 5baec21..c2c4fa7 100644
--- a/application.rb
+++ b/application.rb
@@ -50,8 +50,6 @@ get '/task/?' do
smiles = compound.smiles
task = Task.find(params[:predictions].to_s)
unless task.predictions[params[:model]].nil?
- model = Model::Validation.find params[:model].to_s
- type = (model.regression? ? "Regression" : "Classification")
if params[:model] == "Cramer"
prediction = task.predictions[params[:model]]
html = "<table class=\"table table-bordered single-batch\"><tr>"
@@ -62,6 +60,8 @@ get '/task/?' do
string += "</table></td>"
html += "#{string}</tr></table>"
else
+ model = Model::Validation.find params[:model].to_s
+ type = (model.regression? ? "Regression" : "Classification")
html = "<table class=\"table table-bordered single-batch\"><tr>"
html += "<td>#{image}</br>#{smiles}</br></td>"
string = "<td><table class=\"table\">"