Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -2,6 +2,15 @@ import gradio as gr
|
|
| 2 |
import base64
|
| 3 |
#import execjs
|
| 4 |
# Define the Mermaid code for the flowchart
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
mermaid_code = """
|
| 6 |
graph TD;
|
| 7 |
A[Start] --> B[Decision]
|
|
@@ -43,6 +52,6 @@ graph LR;
|
|
| 43 |
with gr.Blocks() as app:
|
| 44 |
inp_text=gr.Textbox(value=mermaid_code)
|
| 45 |
|
| 46 |
-
out_html=gr.
|
| 47 |
#app.load(mm,inp_text,out_html)
|
| 48 |
app.launch()
|
|
|
|
| 2 |
import base64
|
| 3 |
#import execjs
|
| 4 |
# Define the Mermaid code for the flowchart
|
| 5 |
+
|
| 6 |
+
mm_html="""
|
| 7 |
+
<pre class="mermaid">
|
| 8 |
+
graph LR
|
| 9 |
+
A --- B
|
| 10 |
+
B-->C[fa:fa-ban forbidden]
|
| 11 |
+
B-->D(fa:fa-spinner);
|
| 12 |
+
</pre>"""
|
| 13 |
+
|
| 14 |
mermaid_code = """
|
| 15 |
graph TD;
|
| 16 |
A[Start] --> B[Decision]
|
|
|
|
| 52 |
with gr.Blocks() as app:
|
| 53 |
inp_text=gr.Textbox(value=mermaid_code)
|
| 54 |
|
| 55 |
+
out_html=gr.HTML(mm_html)
|
| 56 |
#app.load(mm,inp_text,out_html)
|
| 57 |
app.launch()
|