Spaces:
Paused
Paused
adding tabbed interface
Browse files
app.py
CHANGED
@@ -21,20 +21,23 @@ def render_markdown(md_text):
|
|
21 |
|
22 |
# Creating the Gradio Interface
|
23 |
with gr.Blocks(theme="Nymbo/Nymbo_Theme") as demo:
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
|
26 |
-
|
27 |
-
with gr.Column():
|
28 |
-
md_input = gr.Textbox(
|
29 |
-
lines=20,
|
30 |
-
placeholder="Write your markdown here...",
|
31 |
-
label="Markdown Input",
|
32 |
-
elem_classes=["gr-textbox"]
|
33 |
-
)
|
34 |
-
with gr.Column():
|
35 |
-
md_output = gr.HTML(label="Rendered Output", elem_classes=["gr-html"])
|
36 |
-
|
37 |
-
md_input.change(render_markdown, inputs=md_input, outputs=md_output)
|
38 |
|
39 |
# Launch the app
|
40 |
demo.launch()
|
|
|
21 |
|
22 |
# Creating the Gradio Interface
|
23 |
with gr.Blocks(theme="Nymbo/Nymbo_Theme") as demo:
|
24 |
+
|
25 |
+
with gr.Tab("Live Preview"):
|
26 |
+
|
27 |
+
gr.Markdown("# Markdown Suite")
|
28 |
+
|
29 |
+
with gr.Row():
|
30 |
+
with gr.Column():
|
31 |
+
md_input = gr.Textbox(
|
32 |
+
lines=20,
|
33 |
+
placeholder="Write your markdown here...",
|
34 |
+
label="Markdown Input",
|
35 |
+
elem_classes=["gr-textbox"]
|
36 |
+
)
|
37 |
+
with gr.Column():
|
38 |
+
md_output = gr.HTML(label="Rendered Output", elem_classes=["gr-html"])
|
39 |
|
40 |
+
md_input.change(render_markdown, inputs=md_input, outputs=md_output)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
41 |
|
42 |
# Launch the app
|
43 |
demo.launch()
|