Skip to content

Commit

Permalink
changed result code and server
Browse files Browse the repository at this point in the history
  • Loading branch information
swissme8888 committed May 2, 2017
1 parent fbbe157 commit b1c2877
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 20 deletions.
7 changes: 6 additions & 1 deletion server.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,12 @@ def upload_file():
print(bulkdata)
retData=flipFlopped(bulkdata)
print(retData)
result = {"# of fllipflops" : 1212, "# of consistencies":12321}
result = {}
for i in retData:
for j in range(len(i[1])):
result[i[0]+"flipflop #"+j]= i[1][j]
for j in range(len(i[2])):
result[i[0]+"consistent #"+j]=i[2][j]
return render_template("result.html",result = result)
# first cut file lenghts down the concat them

Expand Down
26 changes: 7 additions & 19 deletions templates/result.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,27 +44,15 @@ <h2> Results </h2>

</center>

<table style="background-color:rgba(0,0,0,0.15)" border = 1>
{% for (int i=0; i<result.length;i++) %}

<tr>
<th> {{ "sentence" }} </th>
<td> {{ result[i][0] }} </td>
{% for (int j=0; j< result[i][1].length;j++) %}
<th> {{ "fllipflops" }} </th>
<td> {{ result[i][1][j] }} </td>
{% endfor %}
{% for (int k=0; k< result[i][2].length ; k++) %}
<th> {{ "consistencies"}} </th>
<td> {{ result[i][2][k] }} </td>
{% endfor %}

</tr>
{% endfor %}


<table style="background-color:rgba(0,0,0,0.15)" border = 1>
{% for key, value in result.items() %}

<tr>
<th> {{ key }} </th>
<td> {{ value }} </td>
</tr>

{% endfor %}

</table>

Expand Down

0 comments on commit b1c2877

Please # to comment.