Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -37,6 +37,12 @@ if __name__ == "__main__":
|
|
| 37 |
border-radius: 8px;
|
| 38 |
padding: 10px;
|
| 39 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 40 |
/* Dark mode styles */
|
| 41 |
.gradio-container.dark {
|
| 42 |
--tw-bg-opacity: 1;
|
|
@@ -101,13 +107,13 @@ if __name__ == "__main__":
|
|
| 101 |
)
|
| 102 |
|
| 103 |
gr.Markdown("## Examples")
|
| 104 |
-
with gr.Row():
|
| 105 |
-
gr.Image(value="./images/cm1.svg", label="Sample 1", show_label=True, interactive=False, height=
|
| 106 |
-
gr.Image(value="./images/cm2.svg", label="Sample 2", show_label=True, interactive=False, height=
|
| 107 |
|
| 108 |
with gr.TabItem("Synoptic Chart"):
|
| 109 |
with gr.Row():
|
| 110 |
-
with gr.Column(scale=
|
| 111 |
json_input_sc = gr.Textbox(
|
| 112 |
value=SYNOPTIC_CHART_JSON,
|
| 113 |
placeholder="Paste JSON following the documented format",
|
|
@@ -131,13 +137,13 @@ if __name__ == "__main__":
|
|
| 131 |
)
|
| 132 |
|
| 133 |
gr.Markdown("## Examples")
|
| 134 |
-
with gr.Row():
|
| 135 |
-
gr.Image(value="./images/sc1.svg", label="Sample 1", show_label=True, interactive=False, height=
|
| 136 |
-
gr.Image(value="./images/sc2.svg", label="Sample 2", show_label=True, interactive=False, height=
|
| 137 |
|
| 138 |
with gr.TabItem("Radial Diagram"):
|
| 139 |
with gr.Row():
|
| 140 |
-
with gr.Column(scale=
|
| 141 |
json_input_rd = gr.Textbox(
|
| 142 |
value=RADIAL_DIAGRAM_JSON,
|
| 143 |
placeholder="Paste JSON following the documented format",
|
|
@@ -161,16 +167,15 @@ if __name__ == "__main__":
|
|
| 161 |
)
|
| 162 |
|
| 163 |
gr.Markdown("## Examples")
|
| 164 |
-
with gr.Row():
|
| 165 |
-
gr.Image(value="./images/rd1.svg", label="Sample 1", show_label=True, interactive=False, height=
|
| 166 |
-
gr.Image(value="./images/rd2.svg", label="Sample 2", show_label=True, interactive=False, height=
|
| 167 |
-
|
| 168 |
-
gr.Image(value="./images/
|
| 169 |
-
gr.Image(value="./images/rd4.svg", label="Sample 4", show_label=True, interactive=False, height=250)
|
| 170 |
|
| 171 |
with gr.TabItem("Process Flow"):
|
| 172 |
with gr.Row():
|
| 173 |
-
with gr.Column(scale=
|
| 174 |
json_input_pf = gr.Textbox(
|
| 175 |
value=PROCESS_FLOW_JSON,
|
| 176 |
placeholder="Paste JSON following the documented format",
|
|
@@ -194,13 +199,13 @@ if __name__ == "__main__":
|
|
| 194 |
)
|
| 195 |
|
| 196 |
gr.Markdown("## Examples")
|
| 197 |
-
with gr.Row():
|
| 198 |
-
gr.Image(value="./images/pf1.svg", label="Sample 1", show_label=True, interactive=False, height=
|
| 199 |
-
gr.Image(value="./images/pf2.svg", label="Sample 2", show_label=True, interactive=False, height=
|
| 200 |
|
| 201 |
with gr.TabItem("WBS Diagram"):
|
| 202 |
with gr.Row():
|
| 203 |
-
with gr.Column(scale=
|
| 204 |
json_input_wbs = gr.Textbox(
|
| 205 |
value=WBS_DIAGRAM_JSON,
|
| 206 |
placeholder="Paste JSON following the documented format",
|
|
@@ -224,9 +229,9 @@ if __name__ == "__main__":
|
|
| 224 |
)
|
| 225 |
|
| 226 |
gr.Markdown("## Examples")
|
| 227 |
-
with gr.Row():
|
| 228 |
-
gr.Image(value="./images/wd1.svg", label="Sample 1", show_label=True, interactive=False, height=
|
| 229 |
-
gr.Image(value="./images/wd2.svg", label="Sample 2", show_label=True, interactive=False, height=
|
| 230 |
|
| 231 |
demo.launch(
|
| 232 |
mcp_server=True,
|
|
|
|
| 37 |
border-radius: 8px;
|
| 38 |
padding: 10px;
|
| 39 |
}
|
| 40 |
+
.example-images img {
|
| 41 |
+
max-width: 100%;
|
| 42 |
+
height: auto;
|
| 43 |
+
min-height: 400px;
|
| 44 |
+
object-fit: contain;
|
| 45 |
+
}
|
| 46 |
/* Dark mode styles */
|
| 47 |
.gradio-container.dark {
|
| 48 |
--tw-bg-opacity: 1;
|
|
|
|
| 107 |
)
|
| 108 |
|
| 109 |
gr.Markdown("## Examples")
|
| 110 |
+
with gr.Row(elem_classes=["example-images"]):
|
| 111 |
+
gr.Image(value="./images/cm1.svg", label="Sample 1", show_label=True, interactive=False, height=500, width="100%")
|
| 112 |
+
gr.Image(value="./images/cm2.svg", label="Sample 2", show_label=True, interactive=False, height=500, width="100%")
|
| 113 |
|
| 114 |
with gr.TabItem("Synoptic Chart"):
|
| 115 |
with gr.Row():
|
| 116 |
+
with gr.Column(scale=1):
|
| 117 |
json_input_sc = gr.Textbox(
|
| 118 |
value=SYNOPTIC_CHART_JSON,
|
| 119 |
placeholder="Paste JSON following the documented format",
|
|
|
|
| 137 |
)
|
| 138 |
|
| 139 |
gr.Markdown("## Examples")
|
| 140 |
+
with gr.Row(elem_classes=["example-images"]):
|
| 141 |
+
gr.Image(value="./images/sc1.svg", label="Sample 1", show_label=True, interactive=False, height=500, width="100%")
|
| 142 |
+
gr.Image(value="./images/sc2.svg", label="Sample 2", show_label=True, interactive=False, height=500, width="100%")
|
| 143 |
|
| 144 |
with gr.TabItem("Radial Diagram"):
|
| 145 |
with gr.Row():
|
| 146 |
+
with gr.Column(scale=1):
|
| 147 |
json_input_rd = gr.Textbox(
|
| 148 |
value=RADIAL_DIAGRAM_JSON,
|
| 149 |
placeholder="Paste JSON following the documented format",
|
|
|
|
| 167 |
)
|
| 168 |
|
| 169 |
gr.Markdown("## Examples")
|
| 170 |
+
with gr.Row(elem_classes=["example-images"]):
|
| 171 |
+
gr.Image(value="./images/rd1.svg", label="Sample 1", show_label=True, interactive=False, height=500, width="100%")
|
| 172 |
+
gr.Image(value="./images/rd2.svg", label="Sample 2", show_label=True, interactive=False, height=500, width="100%")
|
| 173 |
+
gr.Image(value="./images/rd3.svg", label="Sample 3", show_label=True, interactive=False, height=500, width="100%")
|
| 174 |
+
gr.Image(value="./images/rd4.svg", label="Sample 4", show_label=True, interactive=False, height=500, width="100%")
|
|
|
|
| 175 |
|
| 176 |
with gr.TabItem("Process Flow"):
|
| 177 |
with gr.Row():
|
| 178 |
+
with gr.Column(scale=1):
|
| 179 |
json_input_pf = gr.Textbox(
|
| 180 |
value=PROCESS_FLOW_JSON,
|
| 181 |
placeholder="Paste JSON following the documented format",
|
|
|
|
| 199 |
)
|
| 200 |
|
| 201 |
gr.Markdown("## Examples")
|
| 202 |
+
with gr.Row(elem_classes=["example-images"]):
|
| 203 |
+
gr.Image(value="./images/pf1.svg", label="Sample 1", show_label=True, interactive=False, height=500, width="100%")
|
| 204 |
+
gr.Image(value="./images/pf2.svg", label="Sample 2", show_label=True, interactive=False, height=500, width="100%")
|
| 205 |
|
| 206 |
with gr.TabItem("WBS Diagram"):
|
| 207 |
with gr.Row():
|
| 208 |
+
with gr.Column(scale=1):
|
| 209 |
json_input_wbs = gr.Textbox(
|
| 210 |
value=WBS_DIAGRAM_JSON,
|
| 211 |
placeholder="Paste JSON following the documented format",
|
|
|
|
| 229 |
)
|
| 230 |
|
| 231 |
gr.Markdown("## Examples")
|
| 232 |
+
with gr.Row(elem_classes=["example-images"]):
|
| 233 |
+
gr.Image(value="./images/wd1.svg", label="Sample 1", show_label=True, interactive=False, height=500, width="100%")
|
| 234 |
+
gr.Image(value="./images/wd2.svg", label="Sample 2", show_label=True, interactive=False, height=500, width="100%")
|
| 235 |
|
| 236 |
demo.launch(
|
| 237 |
mcp_server=True,
|