Skip to content

Commit

Permalink
Fixed some errors. Now getting secret key errors.
Browse files Browse the repository at this point in the history
  • Loading branch information
rashmisankepally committed Nov 28, 2019
1 parent 6b4b872 commit a63cbf3
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
2 changes: 1 addition & 1 deletion src/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def experiment(experiment_id):
return r.get(experiment_id+'_statistics').decode('utf-8')


@app.route('/')
@app.route('/', methods=['GET', 'POST'])
def hello():
return render_template('viz.html')

Expand Down
17 changes: 17 additions & 0 deletions src/static/IRViz.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,26 @@ var graphDiv = document.getElementById('tester'),
data = [{x: [], y:[]}],
layout = {};

var egDiv = document.getElementById('topslider');

Plotly.newPlot(graphDiv, data, layout);


$.ajax({
type: "POST",
url: "upload",
contentType: "application/json",
data: JSON.stringify([data]),
dataType: "json",
success: function (response) {
console.log(Date.now());
console.log(data)
},
error: function (error) {
console.log(error);
}
});

/*
$.get("/data", function(data){
console.log(data)
Expand Down
12 changes: 5 additions & 7 deletions src/templates/viz.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,12 @@
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
</head>


<div id="upload">abc</div>

<div id="upload"></div>
<div class = "ex1">
<select id="mySelect">
<option>MAP</option>
<option>nDCG</option>
</select>
<select id="mySelect">
<option>MAP</option>
<option>nDCG</option>
</select>
</div>

<div id="tester"></div>
Expand Down

0 comments on commit a63cbf3

Please sign in to comment.