Spaces:
Running
Running
Insert button to generate the tree
Browse files
app.py
CHANGED
@@ -64,8 +64,10 @@ with demo:
|
|
64 |
gr.Image(value="https://img.unocero.com/2019/11/facebook-app-para-hacer-memes-1-1024x576.jpg",label="", type="URL")
|
65 |
with gr.Column():
|
66 |
input_expr = gr.Textbox(label="Input", placeholder="Enter an expression here")
|
|
|
67 |
out_flat_tree = gr.Textbox(label="Flat tree", value="")
|
68 |
-
|
|
|
69 |
out_image_tree = gr.HTML(label="")
|
70 |
|
71 |
gr.Examples(
|
@@ -95,10 +97,15 @@ with demo:
|
|
95 |
examples_per_page=25,
|
96 |
)
|
97 |
|
98 |
-
input_expr.change(
|
|
|
|
|
|
|
|
|
99 |
fn=genFlatDepthTree,
|
100 |
inputs=input_expr,
|
101 |
outputs=[out_image_tree, out_flat_tree])
|
|
|
102 |
|
103 |
demo.queue(concurrency_count=10)
|
104 |
demo.launch(debug=True)
|
|
|
64 |
gr.Image(value="https://img.unocero.com/2019/11/facebook-app-para-hacer-memes-1-1024x576.jpg",label="", type="URL")
|
65 |
with gr.Column():
|
66 |
input_expr = gr.Textbox(label="Input", placeholder="Enter an expression here")
|
67 |
+
with gr.Row(): btn_get_tree = gr.Button(value="Get Tree")
|
68 |
out_flat_tree = gr.Textbox(label="Flat tree", value="")
|
69 |
+
|
70 |
+
|
71 |
out_image_tree = gr.HTML(label="")
|
72 |
|
73 |
gr.Examples(
|
|
|
97 |
examples_per_page=25,
|
98 |
)
|
99 |
|
100 |
+
# input_expr.change(
|
101 |
+
# fn=genFlatDepthTree,
|
102 |
+
# inputs=input_expr,
|
103 |
+
# outputs=[out_image_tree, out_flat_tree])
|
104 |
+
btn_get_tree.click(
|
105 |
fn=genFlatDepthTree,
|
106 |
inputs=input_expr,
|
107 |
outputs=[out_image_tree, out_flat_tree])
|
108 |
+
)
|
109 |
|
110 |
demo.queue(concurrency_count=10)
|
111 |
demo.launch(debug=True)
|