Graham Paasch commited on
Commit
f7a97bc
·
1 Parent(s): 4c77182

Fix diagram display: use Textbox instead of Code

Browse files

- gr.Code doesn't support plain text in Gradio 4.44.0
- Changed to gr.Textbox with lines=20, max_lines=40 for ASCII diagrams
- Fixes ValueError: Language text not supported

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -300,7 +300,7 @@ def build_ui():
300
  setup_output = gr.Markdown(label="Deployment Guide")
301
 
302
  with gr.Tab("📊 Diagram"):
303
- diagram_output = gr.Code(label="Network Diagram", language="text")
304
 
305
  with gr.Tab("Build Network"):
306
  gr.Markdown("### 🌱 Build Network from Description\nDescribe your network needs in plain English - Overgrowth builds and configures it automatically.")
@@ -350,7 +350,7 @@ def build_ui():
350
  )
351
  get_topology_btn = gr.Button("Get Topology")
352
  topology_summary = gr.Markdown(label="Topology Summary")
353
- topology_diagram = gr.Code(label="Network Diagram (ASCII)", language="text")
354
  topology_details = gr.Code(label="Topology JSON", language="json")
355
 
356
  with gr.Column():
 
300
  setup_output = gr.Markdown(label="Deployment Guide")
301
 
302
  with gr.Tab("📊 Diagram"):
303
+ diagram_output = gr.Textbox(label="Network Diagram", lines=20, max_lines=40)
304
 
305
  with gr.Tab("Build Network"):
306
  gr.Markdown("### 🌱 Build Network from Description\nDescribe your network needs in plain English - Overgrowth builds and configures it automatically.")
 
350
  )
351
  get_topology_btn = gr.Button("Get Topology")
352
  topology_summary = gr.Markdown(label="Topology Summary")
353
+ topology_diagram = gr.Textbox(label="Network Diagram (ASCII)", lines=20, max_lines=40)
354
  topology_details = gr.Code(label="Topology JSON", language="json")
355
 
356
  with gr.Column():