summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgebele <gebele@in-silico.ch>2019-06-27 08:37:33 +0000
committergebele <gebele@in-silico.ch>2019-06-27 08:37:33 +0000
commit2d4782c4e8df908efa0973ee842593ead58d5980 (patch)
treeaa418dd35586f32b0da786ab4124f6fce45cf444
parentbba7061d7ff2420f4eb2b6f88362edb71bc6bf25 (diff)
use prediction to csv;edit info text
-rw-r--r--application.rb4
-rw-r--r--views/batch.haml2
-rw-r--r--views/info.haml2
-rw-r--r--views/model_details.haml2
-rw-r--r--views/style.scss6
5 files changed, 11 insertions, 5 deletions
diff --git a/application.rb b/application.rb
index edbd289..060d163 100644
--- a/application.rb
+++ b/application.rb
@@ -135,7 +135,7 @@ get '/predict/batch/download/?' do
prediction_dataset = Dataset.find task.dataset_id
filename = prediction_dataset.name
tempfile = Tempfile.new
- tempfile << prediction_dataset.to_csv
+ tempfile << prediction_dataset.to_prediction_csv
tempfile.rewind
response['Content-Type'] = "text/csv"
send_file tempfile, :filename => "#{Time.now.strftime("%Y-%m-%d")}_lazar_batch_prediction_#{filename}.csv", :type => "text/csv", :disposition => "attachment"
@@ -171,7 +171,7 @@ post '/predict/?' do
t.update_percent(90)
prediction[model_id] = prediction_dataset.id.to_s
t[:predictions] = prediction
- t[:csv] = prediction_dataset.to_csv
+ t[:csv] = prediction_dataset.to_prediction_csv
t.update_percent(100)
t.save
end
diff --git a/views/batch.haml b/views/batch.haml
index fb317c9..d8e6862 100644
--- a/views/batch.haml
+++ b/views/batch.haml
@@ -128,7 +128,7 @@
- @models.each_with_index do |model,idx|
- m = Model::Validation.find model
- task = @tasks[idx].id
- #result.caret.bg-light{:id=>idx}
+ #result.card.bg-light{:id=>idx}
%div.card-body
%div.row
%div.col-6
diff --git a/views/info.haml b/views/info.haml
index 148d53f..d2730aa 100644
--- a/views/info.haml
+++ b/views/info.haml
@@ -1,3 +1,3 @@
%div.card.border-warning.mb-3
%div.card-body
- We are rebuilding the models. It will take a while, please be patient and reload the page in some time.
+ We are rebuilding our models. It will take a while, please be patient and reload the page later.
diff --git a/views/model_details.haml b/views/model_details.haml
index 3825949..600aaf8 100644
--- a/views/model_details.haml
+++ b/views/model_details.haml
@@ -66,7 +66,7 @@
%table.table-sm
- keys.each_with_index do |key,idx|
%tr
- %td.text-right.pr-0= key.gsub("_", " ")+":"
+ %td.fit.text-right.pr-0= key.gsub("_", " ")+":"
%td
/ accuray value:
%table.table-sm
diff --git a/views/style.scss b/views/style.scss
index 01b5147..52be743 100644
--- a/views/style.scss
+++ b/views/style.scss
@@ -93,3 +93,9 @@ supporters{
margin: 1em;
}
}
+
+.table td.fit,
+.table th.fit {
+ white-space: nowrap;
+ width: 1%;
+}