alessandro trinca tornidor
commited on
Commit
•
0e9a197
1
Parent(s):
39d5cde
feat: format gradio app into row and columns
Browse files
app.py
CHANGED
@@ -45,15 +45,20 @@ def get_example_complete(example_text):
|
|
45 |
def get_gradio_interface_geojson(fn_inference: Callable):
|
46 |
with gr.Blocks() as gradio_app:
|
47 |
gr.Markdown(GRADIO_MARKDOWN)
|
48 |
-
|
49 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
gr.Examples(
|
51 |
examples=[
|
52 |
get_example_complete(example) for example in GRADIO_EXAMPLES_TEXT_LIST
|
53 |
],
|
54 |
inputs=[text_input],
|
55 |
)
|
56 |
-
btn = gr.Button(value="Submit")
|
57 |
btn.click(
|
58 |
fn_inference,
|
59 |
inputs=[text_input],
|
|
|
45 |
def get_gradio_interface_geojson(fn_inference: Callable):
|
46 |
with gr.Blocks() as gradio_app:
|
47 |
gr.Markdown(GRADIO_MARKDOWN)
|
48 |
+
|
49 |
+
with gr.Row():
|
50 |
+
with gr.Column():
|
51 |
+
text_input = gr.Textbox(lines=1, placeholder=None, label="Payload input")
|
52 |
+
btn = gr.Button(value="Submit")
|
53 |
+
with gr.Column():
|
54 |
+
text_output = gr.Textbox(lines=1, placeholder=None, label="Geojson Output")
|
55 |
+
|
56 |
gr.Examples(
|
57 |
examples=[
|
58 |
get_example_complete(example) for example in GRADIO_EXAMPLES_TEXT_LIST
|
59 |
],
|
60 |
inputs=[text_input],
|
61 |
)
|
|
|
62 |
btn.click(
|
63 |
fn_inference,
|
64 |
inputs=[text_input],
|