Spaces:
Running
Running
render result to a jinja table
Browse files- requirements.txt +1 -0
- templates/table_template.html +18 -0
requirements.txt
CHANGED
|
@@ -10,5 +10,6 @@ huggingface_hub
|
|
| 10 |
transformers
|
| 11 |
pandas
|
| 12 |
pyarrow
|
|
|
|
| 13 |
uvicorn[standard]
|
| 14 |
|
|
|
|
| 10 |
transformers
|
| 11 |
pandas
|
| 12 |
pyarrow
|
| 13 |
+
jinja2
|
| 14 |
uvicorn[standard]
|
| 15 |
|
templates/table_template.html
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<table border="1">
|
| 2 |
+
<thead>
|
| 3 |
+
<tr>
|
| 4 |
+
{% for col in columns %}
|
| 5 |
+
<th>{{ col }}</th>
|
| 6 |
+
{% endfor %}
|
| 7 |
+
</tr>
|
| 8 |
+
</thead>
|
| 9 |
+
<tbody>
|
| 10 |
+
{% for row in data %}
|
| 11 |
+
<tr>
|
| 12 |
+
{% for col in columns %}
|
| 13 |
+
<td>{{ row[col] }}</td>
|
| 14 |
+
{% endfor %}
|
| 15 |
+
</tr>
|
| 16 |
+
{% endfor %}
|
| 17 |
+
</tbody>
|
| 18 |
+
</table>
|