davda54
commited on
Commit
·
0e59e1d
1
Parent(s):
f0c8007
use tabulate instead
Browse files- app.py +2 -7
- requirements.txt +1 -1
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import gradio as gr
|
2 |
-
import
|
3 |
|
4 |
|
5 |
description = """
|
@@ -94,12 +94,7 @@ def render_table(forms, lemmas, upos, xpos, feats, metadata, edges, edge_labels)
|
|
94 |
*([""] + list(row) for row in feats[1:])
|
95 |
]
|
96 |
|
97 |
-
|
98 |
-
table.field_names = array[0]
|
99 |
-
for row in array[1:]:
|
100 |
-
table.add_row(row)
|
101 |
-
|
102 |
-
return table.get_html_string()
|
103 |
|
104 |
|
105 |
with gr.Blocks(theme='sudeepshouche/minimalist') as demo:
|
|
|
1 |
import gradio as gr
|
2 |
+
import tabulate
|
3 |
|
4 |
|
5 |
description = """
|
|
|
94 |
*([""] + list(row) for row in feats[1:])
|
95 |
]
|
96 |
|
97 |
+
return tabulate.tabulate(array, tablefmt="html")
|
|
|
|
|
|
|
|
|
|
|
98 |
|
99 |
|
100 |
with gr.Blocks(theme='sudeepshouche/minimalist') as demo:
|
requirements.txt
CHANGED
@@ -1 +1 @@
|
|
1 |
-
|
|
|
1 |
+
tabulate
|