ZahirJS commited on
Commit
d54c5a8
·
verified ·
1 Parent(s): 48e1fff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +35 -34
app.py CHANGED
@@ -87,40 +87,41 @@ if __name__ == "__main__":
87
 
88
  with gr.Tabs():
89
  with gr.TabItem("Class Diagram"):
90
- with gr.Row():
91
- with gr.Column(scale=1):
92
- json_input_cd = gr.Textbox(
93
- value=CLASS_DIAGRAM_JSON,
94
- placeholder="Paste JSON following the documented format",
95
- label="JSON Input",
96
- lines=20
97
- )
98
- submit_btn_cd = gr.Button("Generate Class Diagram", variant="primary")
99
-
100
- with gr.Column(scale=2):
101
- output_cd = gr.Image(
102
- label="Generated Diagram",
103
- type="filepath",
104
- show_download_button=True,
105
- height=500
106
- )
107
-
108
- submit_btn_cd.click(
109
- fn=generate_class_diagram,
110
- inputs=[json_input_cd, output_format_radio],
111
- outputs=output_cd
112
- )
113
-
114
- gr.Markdown("## Examples")
115
- with gr.Row(elem_classes=["example-images"]):
116
- gr.Image(value="./images/cd1.svg", label="Sample 1", show_label=True, interactive=False, height="auto", width="100%")
117
- gr.Image(value="./images/cd2.svg", label="Sample 2", show_label=True, interactive=False, height="auto", width="100%")
118
- with gr.Row(elem_classes=["example-images"]):
119
- gr.Image(value="./images/cd3.svg", label="Sample 3", show_label=True, interactive=False, height="auto", width="100%")
120
- gr.Image(value="./images/cd4.svg", label="Sample 4", show_label=True, interactive=False, height="auto", width="100%")
121
- with gr.Row(elem_classes=["example-images"]):
122
- gr.Image(value="./images/cd5.svg", label="Sample 5", show_label=True, interactive=False, height="auto", width="100%")
123
- gr.Image(value="./images/cd6.svg", label="Sample 6", show_label=True, interactive=False, height="auto", width="100%")
 
124
 
125
  # with gr.TabItem("Entity Relationship"):
126
  # with gr.Row():
 
87
 
88
  with gr.Tabs():
89
  with gr.TabItem("Class Diagram"):
90
+ with gr.Row():
91
+ with gr.Column(scale=1):
92
+ json_input_cd = gr.Textbox(
93
+ value=CLASS_DIAGRAM_JSON,
94
+ placeholder="Paste JSON following the documented format",
95
+ label="JSON Input",
96
+ lines=20
97
+ )
98
+ submit_btn_cd = gr.Button("Generate Class Diagram", variant="primary")
99
+
100
+ with gr.Column(scale=2):
101
+ output_cd = gr.Image(
102
+ label="Generated Diagram",
103
+ type="filepath",
104
+ show_download_button=True,
105
+ height=500
106
+ )
107
+
108
+ submit_btn_cd.click(
109
+ fn=generate_class_diagram,
110
+ inputs=[json_input_cd, output_format_radio],
111
+ outputs=output_cd
112
+ )
113
+
114
+ gr.Markdown("## Examples")
115
+ with gr.Row():
116
+ with gr.Column(scale=1):
117
+ gr.Image(value="./images/cd1.svg", label="Sample 1", show_label=True, interactive=False, height="auto")
118
+ gr.Image(value="./images/cd3.svg", label="Sample 3", show_label=True, interactive=False, height="auto")
119
+ gr.Image(value="./images/cd5.svg", label="Sample 5", show_label=True, interactive=False, height="auto")
120
+
121
+ with gr.Column(scale=1):
122
+ gr.Image(value="./images/cd2.svg", label="Sample 2", show_label=True, interactive=False, height="auto")
123
+ gr.Image(value="./images/cd4.svg", label="Sample 4", show_label=True, interactive=False, height="auto")
124
+ gr.Image(value="./images/cd6.svg", label="Sample 6", show_label=True, interactive=False, height="auto")
125
 
126
  # with gr.TabItem("Entity Relationship"):
127
  # with gr.Row():