ZahirJS commited on
Commit
7fc19d1
·
verified ·
1 Parent(s): 8513ac3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +35 -29
app.py CHANGED
@@ -112,39 +112,45 @@ if __name__ == "__main__":
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
 
119
- with gr.TabItem("Entity Relationship"):
120
- with gr.Row():
121
- with gr.Column(scale=1):
122
- json_input_er = gr.Textbox(
123
- value=ENTITY_RELATIONSHIP_JSON,
124
- placeholder="Paste JSON following the documented format",
125
- label="JSON Input",
126
- lines=20
127
- )
128
- submit_btn_er = gr.Button("Generate ER Diagram", variant="primary")
129
 
130
- with gr.Column(scale=2):
131
- output_er = gr.Image(
132
- label="Generated Diagram",
133
- type="filepath",
134
- show_download_button=True,
135
- height=500
136
- )
137
 
138
- submit_btn_er.click(
139
- fn=generate_entity_relationship_diagram,
140
- inputs=[json_input_er, output_format_radio],
141
- outputs=output_er
142
- )
143
 
144
- gr.Markdown("## Examples")
145
- #with gr.Row(elem_classes=["example-images"]):
146
- #gr.Image(value="./images/er1.svg", label="Sample 1", show_label=True, interactive=False, height="auto", width="100%")
147
- #gr.Image(value="./images/er2.svg", label="Sample 2", show_label=True, interactive=False, height="auto", width="100%")
148
 
149
  with gr.TabItem("Radial Diagram"):
150
  with gr.Row():
 
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 1", show_label=True, interactive=False, height="auto", width="100%")
120
+ gr.Image(value="./images/cd4.svg", label="Sample 2", 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 1", show_label=True, interactive=False, height="auto", width="100%")
123
+ gr.Image(value="./images/cd6.svg", label="Sample 2", show_label=True, interactive=False, height="auto", width="100%")
124
 
125
+ # with gr.TabItem("Entity Relationship"):
126
+ # with gr.Row():
127
+ # with gr.Column(scale=1):
128
+ # json_input_er = gr.Textbox(
129
+ # value=ENTITY_RELATIONSHIP_JSON,
130
+ # placeholder="Paste JSON following the documented format",
131
+ # label="JSON Input",
132
+ # lines=20
133
+ # )
134
+ # submit_btn_er = gr.Button("Generate ER Diagram", variant="primary")
135
 
136
+ # with gr.Column(scale=2):
137
+ # output_er = gr.Image(
138
+ # label="Generated Diagram",
139
+ # type="filepath",
140
+ # show_download_button=True,
141
+ # height=500
142
+ # )
143
 
144
+ # submit_btn_er.click(
145
+ # fn=generate_entity_relationship_diagram,
146
+ # inputs=[json_input_er, output_format_radio],
147
+ # outputs=output_er
148
+ # )
149
 
150
+ # gr.Markdown("## Examples")
151
+ # with gr.Row(elem_classes=["example-images"]):
152
+ # gr.Image(value="./images/er1.svg", label="Sample 1", show_label=True, interactive=False, height="auto", width="100%")
153
+ # gr.Image(value="./images/er2.svg", label="Sample 2", show_label=True, interactive=False, height="auto", width="100%")
154
 
155
  with gr.TabItem("Radial Diagram"):
156
  with gr.Row():