Skip to content

Commit

Permalink
Add zebra stripes to cards displaying generated names and predicted c…
Browse files Browse the repository at this point in the history
…ountries of nationality
  • Loading branch information
lk101101 committed Aug 24, 2024
1 parent a74bd34 commit 0e71385
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
14 changes: 9 additions & 5 deletions templates/generate_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,15 @@ <h2 class="mt-4">
</h2>

<!-- List generated names -->
<ul class="list-group">
{% for name in names %}
<li class="list-group-item">{{ name }}</li>
{% endfor %}
</ul>
<table class="table table-striped">
<tbody>
{% for name in names %}
<tr>
<td>{{ name }}</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</main>
{% endblock %}
24 changes: 15 additions & 9 deletions templates/name_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,18 +36,24 @@ <h2 class="mt-4">
<div class="card-header">
Predicted Nationalities
</div>
<ul class="list-group list-group-flush">
<div class="card-body">
{% if nationalize[1] is none %}
<p class="list-group-item d-flex justify-content-between align-items-center">{{ nationalize[0][0] }}</p>
<p class="list-group-item d-flex justify-content-between align-items-center">
{{ nationalize[0][0] }}
</p>
{% else %}
{% for result in nationalize %}
<li class="list-group-item d-flex justify-content-between align-items-center">
<p>Country: <strong>{{ result[0] }}</strong>
| Probability: <strong>{{ result[1] }}%</strong></p>
</li>
{% endfor %}
<table class="table table-striped">
<tbody>
{% for result in nationalize %}
<tr>
<td>Country: <strong>{{ result[0] }}</strong></td>
<td>Probability: <strong>{{ result[1] }}%</strong></td>
</tr>
{% endfor %}
</tbody>
</table>
{% endif %}
</ul>
</div>
</div>

<!-- Predicted Gender -->
Expand Down

0 comments on commit 0e71385

Please sign in to comment.