Update app.py
Browse files
app.py
CHANGED
@@ -18,7 +18,7 @@ def parse(text):
|
|
18 |
|
19 |
|
20 |
def render_dependency_tree(words, parents, labels):
|
21 |
-
fig, ax = plt.subplots(figsize=(
|
22 |
|
23 |
# Create a directed graph
|
24 |
G = nx.DiGraph()
|
@@ -188,8 +188,10 @@ with gr.Blocks(theme='sudeepshouche/minimalist', css=custom_css) as demo:
|
|
188 |
]
|
189 |
)
|
190 |
|
191 |
-
|
192 |
-
|
|
|
|
|
193 |
|
194 |
source.submit(
|
195 |
fn=parse, inputs=[source], outputs=[dependency_plot, table], queue=True
|
|
|
18 |
|
19 |
|
20 |
def render_dependency_tree(words, parents, labels):
|
21 |
+
fig, ax = plt.subplots(figsize=(40, 16))
|
22 |
|
23 |
# Create a directed graph
|
24 |
G = nx.DiGraph()
|
|
|
188 |
]
|
189 |
)
|
190 |
|
191 |
+
with gr.Column(scale=1, variant="panel"):
|
192 |
+
gr.Label("", show_label=False, container=False)
|
193 |
+
table = gr.DataFrame(**render_table(forms, lemmas, upos, xpos, feats, ne), interactive=False, datatype="markdown")
|
194 |
+
dependency_plot = gr.Plot(render_dependency_tree(forms, edges, edge_labels), container=False)
|
195 |
|
196 |
source.submit(
|
197 |
fn=parse, inputs=[source], outputs=[dependency_plot, table], queue=True
|