Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -335,65 +335,65 @@ if __name__ == "__main__":
|
|
| 335 |
gr.Image(value="./images/sc1.svg", label="Sample 1", show_label=True, interactive=False, height="auto", width="100%")
|
| 336 |
gr.Image(value="./images/sc2.svg", label="Sample 2", show_label=True, interactive=False, height="auto", width="100%")
|
| 337 |
|
| 338 |
-
|
| 339 |
-
|
| 340 |
-
|
| 341 |
-
|
| 342 |
-
|
| 343 |
-
|
| 344 |
-
|
| 345 |
-
|
| 346 |
-
|
| 347 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 348 |
|
| 349 |
-
|
| 350 |
-
|
| 351 |
-
|
| 352 |
-
|
| 353 |
-
|
| 354 |
-
height=500
|
| 355 |
-
)
|
| 356 |
-
|
| 357 |
-
submit_btn_pf.click(
|
| 358 |
-
fn=generate_process_flow_diagram,
|
| 359 |
-
inputs=[json_input_pf, output_format_radio],
|
| 360 |
-
outputs=output_pf
|
| 361 |
-
)
|
| 362 |
-
|
| 363 |
-
gr.Markdown("## Examples")
|
| 364 |
-
with gr.Row(elem_classes=["example-images"]):
|
| 365 |
-
gr.Image(value="./images/pf1.svg", label="Sample 1", show_label=True, interactive=False, height="auto", width="100%")
|
| 366 |
-
gr.Image(value="./images/pf2.svg", label="Sample 2", show_label=True, interactive=False, height="auto", width="100%")
|
| 367 |
-
|
| 368 |
-
with gr.TabItem("Network Graph"):
|
| 369 |
-
with gr.Row():
|
| 370 |
-
with gr.Column(scale=1):
|
| 371 |
-
json_input_ng = gr.Textbox(
|
| 372 |
-
value=NETWORK_GRAPH_JSON,
|
| 373 |
-
placeholder="Paste JSON following the documented format",
|
| 374 |
-
label="JSON Input",
|
| 375 |
-
lines=20
|
| 376 |
-
)
|
| 377 |
-
submit_btn_ng = gr.Button("Generate Network Graph", variant="primary")
|
| 378 |
|
| 379 |
-
|
| 380 |
-
|
| 381 |
-
|
| 382 |
-
|
| 383 |
-
|
| 384 |
-
|
| 385 |
-
|
| 386 |
-
|
| 387 |
-
|
| 388 |
-
|
| 389 |
-
|
| 390 |
-
|
| 391 |
-
|
| 392 |
-
|
| 393 |
-
|
| 394 |
-
|
| 395 |
-
|
| 396 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 397 |
|
| 398 |
demo.launch(
|
| 399 |
mcp_server=True,
|
|
|
|
| 335 |
gr.Image(value="./images/sc1.svg", label="Sample 1", show_label=True, interactive=False, height="auto", width="100%")
|
| 336 |
gr.Image(value="./images/sc2.svg", label="Sample 2", show_label=True, interactive=False, height="auto", width="100%")
|
| 337 |
|
| 338 |
+
with gr.TabItem("Process Flow"):
|
| 339 |
+
with gr.Row():
|
| 340 |
+
with gr.Column(scale=1):
|
| 341 |
+
json_input_pf = gr.Textbox(
|
| 342 |
+
value=PROCESS_FLOW_JSON,
|
| 343 |
+
placeholder="Paste JSON following the documented format",
|
| 344 |
+
label="JSON Input",
|
| 345 |
+
lines=20
|
| 346 |
+
)
|
| 347 |
+
submit_btn_pf = gr.Button("Generate Process Flow", variant="primary")
|
| 348 |
+
|
| 349 |
+
with gr.Column(scale=2):
|
| 350 |
+
output_pf = gr.Image(
|
| 351 |
+
label="Generated Diagram",
|
| 352 |
+
type="filepath",
|
| 353 |
+
show_download_button=True,
|
| 354 |
+
height=500
|
| 355 |
+
)
|
| 356 |
|
| 357 |
+
submit_btn_pf.click(
|
| 358 |
+
fn=generate_process_flow_diagram,
|
| 359 |
+
inputs=[json_input_pf, output_format_radio],
|
| 360 |
+
outputs=output_pf
|
| 361 |
+
)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 362 |
|
| 363 |
+
gr.Markdown("## Examples")
|
| 364 |
+
with gr.Row(elem_classes=["example-images"]):
|
| 365 |
+
gr.Image(value="./images/pf1.svg", label="Sample 1", show_label=True, interactive=False, height="auto", width="100%")
|
| 366 |
+
gr.Image(value="./images/pf2.svg", label="Sample 2", show_label=True, interactive=False, height="auto", width="100%")
|
| 367 |
+
|
| 368 |
+
with gr.TabItem("Network Graph"):
|
| 369 |
+
with gr.Row():
|
| 370 |
+
with gr.Column(scale=1):
|
| 371 |
+
json_input_ng = gr.Textbox(
|
| 372 |
+
value=NETWORK_GRAPH_JSON,
|
| 373 |
+
placeholder="Paste JSON following the documented format",
|
| 374 |
+
label="JSON Input",
|
| 375 |
+
lines=20
|
| 376 |
+
)
|
| 377 |
+
submit_btn_ng = gr.Button("Generate Network Graph", variant="primary")
|
| 378 |
+
|
| 379 |
+
with gr.Column(scale=2):
|
| 380 |
+
output_ng = gr.Image(
|
| 381 |
+
label="Generated Diagram",
|
| 382 |
+
type="filepath",
|
| 383 |
+
show_download_button=True,
|
| 384 |
+
height=500
|
| 385 |
+
)
|
| 386 |
+
|
| 387 |
+
submit_btn_ng.click(
|
| 388 |
+
fn=generate_network_graph,
|
| 389 |
+
inputs=[json_input_ng, output_format_radio],
|
| 390 |
+
outputs=output_ng
|
| 391 |
+
)
|
| 392 |
+
|
| 393 |
+
gr.Markdown("## Examples")
|
| 394 |
+
with gr.Row(elem_classes=["example-images"]):
|
| 395 |
+
gr.Image(value="./images/ng1.svg", label="Sample 1", show_label=True, interactive=False, height="auto", width="100%")
|
| 396 |
+
gr.Image(value="./images/ng2.svg", label="Sample 2", show_label=True, interactive=False, height="auto", width="100%")
|
| 397 |
|
| 398 |
demo.launch(
|
| 399 |
mcp_server=True,
|