Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -27,22 +27,55 @@ markdown_text = """
|
|
27 |
- Input one budget line per time.
|
28 |
- Accuracy of the model is ~88%.
|
29 |
"""
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
38 |
"""
|
39 |
|
40 |
iface = gr.Interface(
|
41 |
fn=predict,
|
42 |
inputs=gr.components.Textbox(lines=1, placeholder="Enter Budget line here...", label="Budget Input"),
|
43 |
-
outputs=
|
44 |
title="COFOG Level 1 Classification",
|
45 |
description=markdown_text,
|
|
|
46 |
allow_flagging="auto" # Enables flagging
|
47 |
)
|
48 |
|
|
|
27 |
- Input one budget line per time.
|
28 |
- Accuracy of the model is ~88%.
|
29 |
"""
|
30 |
+
# HTML formatted table
|
31 |
+
html_table = """
|
32 |
+
<table>
|
33 |
+
<tr>
|
34 |
+
<th>Epoch</th>
|
35 |
+
<th>Training Loss</th>
|
36 |
+
<th>Validation Loss</th>
|
37 |
+
<th>Accuracy</th>
|
38 |
+
</tr>
|
39 |
+
<tr>
|
40 |
+
<td>1</td>
|
41 |
+
<td>No log</td>
|
42 |
+
<td>2.095209</td>
|
43 |
+
<td>0.340764</td>
|
44 |
+
</tr>
|
45 |
+
<tr>
|
46 |
+
<td>2</td>
|
47 |
+
<td>No log</td>
|
48 |
+
<td>1.419945</td>
|
49 |
+
<td>0.662420</td>
|
50 |
+
</tr>
|
51 |
+
<tr>
|
52 |
+
<td>3</td>
|
53 |
+
<td>No log</td>
|
54 |
+
<td>0.683810</td>
|
55 |
+
<td>0.850318</td>
|
56 |
+
</tr>
|
57 |
+
<tr>
|
58 |
+
<td>4</td>
|
59 |
+
<td>No log</td>
|
60 |
+
<td>0.460408</td>
|
61 |
+
<td>0.872611</td>
|
62 |
+
</tr>
|
63 |
+
<tr>
|
64 |
+
<td>5</td>
|
65 |
+
<td>No log</td>
|
66 |
+
<td>0.422096</td>
|
67 |
+
<td>0.888535</td>
|
68 |
+
</tr>
|
69 |
+
</table>
|
70 |
"""
|
71 |
|
72 |
iface = gr.Interface(
|
73 |
fn=predict,
|
74 |
inputs=gr.components.Textbox(lines=1, placeholder="Enter Budget line here...", label="Budget Input"),
|
75 |
+
outputs=gr.components.Label(label="Classification Output"),
|
76 |
title="COFOG Level 1 Classification",
|
77 |
description=markdown_text,
|
78 |
+
article=html_table,
|
79 |
allow_flagging="auto" # Enables flagging
|
80 |
)
|
81 |
|